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
10 - ETL
10 - ETL

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.

Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]