Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a Pivot table that displays the value (quantity * cost) of inventory based on grades 1-5. I would like to compare two years. I have the following in two different expressions:
sum(aggr(sum({$< Year={$(=Only(Year))}>}PieceLength*TRC),GradeDesc, LinkItem, MO, Lot)) this works
and
sum(aggr(sum({$< Year={$(=Only(Year)-1)}>}PieceLength*TRC),GradeDesc, LinkItem, MO, Lot)) this shows all 0s
The first expression returns data for the year in the selection. The second expression returns 0 for each grade.
What is the proper syntax to return values for year -1?
Thank you for your help.
Try this:
Sum({$< Year={$(=Only(Year)-1)}>}Aggr(Sum({$< Year={$(=Only(Year)-1)}>}PieceLength*TRC),GradeDesc, LinkItem, MO, Lot))
Try this:
Sum({$< Year={$(=Only(Year)-1)}>}Aggr(Sum({$< Year={$(=Only(Year)-1)}>}PieceLength*TRC),GradeDesc, LinkItem, MO, Lot))
Perfect! It works!
Thank you so much!