Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
DamianoD
Contributor II
Contributor II

Incorrect Totals on Pivot Table

Hi Everybody,

I have a problem with Pivot Table Totals, as showed here:

DamianoD_1-1697114472715.png

I know that it could be dependent on Aggr function, but i have tried with no result.

My measure is composed by two dates put on alternate states, for example if user clicks 202201 on the first date and 202205 on the second one, he/she will get results from january to may 2022 for that specific measure, aggregated by the dimension in pivot table,  in this way:

if(ValueList('CY','PY') = 'CY',
Sum ({<YearMonthOrder={">=$(=Only( {DataStart} YearMonthOrder))<=$(=Only( {DataEnd} YearMonthOrder))"}>} num_oda_line_num_CY),
Sum ({<YearMonthOrder={">=$(=Only( {DataStart} date(addmonths(YearMonthOrder,-12),'YYYYMM')))<=$(=Only( {DataEnd} date(addmonths(YearMonthOrder,-12),'YYYYMM')))"}>} num_oda_line_num_CY))

 

Could you tell me how to edit this formula to get proper totals?

 

Thanks,

Damiano

Labels (1)
0 Replies