Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello there,
Can anyone help me with the below?
I need to show in a measure the last loaded month in a table, i tried to use the below script
Aggr((max(MONTH)),TClaimResponseTypes)
But it still shows the null value as an answer, how can i eliminate the null value?
Thank you.
Hi Mustafa,
Use set analysis instead of aggregation.
I used the following sample data:
load
*,
Date(Date#(Year(Date)&'-'&Month(Date),'YYYY-MMM'),'MM-YYYY') as [Year/Month];
load * Inline
[
Id,TClaimResponseTypes,Value,Date
1,A,5,01/01/2018
2,A,11,01/16/2018
3,B,30,02/20/2018
4,C,65,02/20/2018
5,D,88,06/15/2018
6,D,13,04/20/2018
7,E,6,04/20/2018
];
And as an expression, used:
sum({<[Year/Month]={"$(=max([Year/Month]))"}>}Value)
This returns me the latest loaded data month's sum of values, as bellow:
Your logic for the data and year/month field might be different, but it's the same concept.
Hope it helps,
Felipe.
Thank you Felip
No problem Mustafa,
Could you please mark the anwser as correct if it helped you?
Thanks .