Forum Discussion

andrew's avatar
andrew
Cloud Apps
01-12-2024

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

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

Replies have been turned off for this discussion
  • Hi Andrew,

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

    Contribution(pastyear([Total QteVenteRetail1]))

    works perfectly.

    Best, David.