Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Please take a look at this pivot table. The individual numbers are correct. But the Totals do not add up. The formula I have for calculating individual numbers is Count(Distinct upper([Unique Report])). How do I get the totals to agree? I have also attached the excel version.
stalwar1 can you help?
I will look at this again today, have not forgotten you my friend
Can you let me know the reason for using IsNull() here?
if(Isnull(Sum(Aggr(Count(Distinct Upper([Unique Report])), Aging,Months))),0,Sum(Aggr(Count(Distinct Upper([Unique Report])), Aging,Months)))
The expression which finally worked was this, right?
"You might have to move your calculated dimensions into the script.
LOAD Date(MonthStart([Approved Date]), 'MMM-YY') as MonthYear,
If (([Max Days to Submit]) < 16 or IsNull([Max Days to Submit]),' Within Policy',If (([Max Days to Submit]) < 31, '16-30 Days',If (([Max Days to Submit]) <61, '31-60 Days',If (([Max Days to Submit]) < 91, '61-90 Days','90+ Days' ) ))) as NewField
and then use this:
Sum(Aggr(Count(Distinct Upper([Unique Report])), MonthYear, NewField))"
Here is what has worked so far. (With Totals at the top)
[DATA]:
LOAD
[Type],
[Approved Date],
[Max Days to Submit],
[Unique Report],
Date(MonthStart([Approved Date]), 'MMM-YY')as Months,
If (([Max Days to Submit]) < 16 or IsNull([Max Days to Submit]),' Within Policy',If (([Max Days to Submit]) < 31, '16-30 Days',If (([Max Days to Submit]) <61, '31-60 Days',If (([Max Days to Submit]) < 91, '61-90 Days','90+ Days' ) ))) as Aging
FROM [lib://Qlik/FF Data Slide 1.xlsx]
(ooxml, embedded labels, table is DATA);
Dim:
LOAD * INLINE [
Dim
1
2
];
Dim2:
LOAD * INLINE [
Dim2
1
2
];
And the measure has the following formula
Sum(Aggr(Count(Distinct Upper([Unique Report])), Aging,Months))