cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to use the Contribution() function with PASTYEAR() data results in error

andrew
8 - Cloud Apps
8 - Cloud Apps

Has anyone been able to use the contribution() function in conjunction with PASTYEAR()? in PIVOT2

E.g. we have CONTRIBUTION( [ Sales ] ) working fine but attempting CONTRIBUTION( PASTYEAR( [ Sales ] ) ) results in error when adding to a pivot widget.

I have attempted the same using [ Sales ] / ( [ Sales ] , ALL([ Rows ]) )  but this doesn't work if you employ subtotals & grand totals  as the subtotal will be 100 % as opposed to the percentage of the contribution of the subtotal to the grand total.

Can anyone help or at least confirm they get an error too when using CONTRIBUTION( PASTYEAR( [ Sales ] ) )

2 REPLIES 2

Benji_PaldiTeam
11 - Data Pipeline
11 - Data Pipeline

Hi @andrew ,

The argument of CONTRIBUTION function should be an aggregated value.

Try below formula (added SUM inside CONTRIBUTION function):

CONTRIBUTION( SUM (PASTYEAR( [ Sales ] ) ))

Benji_PaldiTeam_0-1705063450310.png

 

Feel free to reach out if you have further questions, we're always happy to help 🙂
[email protected] 
Paldi Solutions, Number #1 Sisense Plugins Developer

 

 

david-h
9 - Travel Pro
9 - Travel Pro

Hi Andrew,

which version of Sisense are you using ? With 2023.9, this formula :

Contribution(pastyear([Total QteVenteRetail1]))

works perfectly.

Best, David.