Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Last Loaded Month Not Null Value

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.

Labels (1)
3 Replies
felipedl
Partner - Specialist III
Partner - Specialist III

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:

sample.png

Your logic for the data and year/month field might be different, but it's the same concept.

Hope it helps,

Felipe.

Anonymous
Not applicable
Author

Thank you Felip

felipedl
Partner - Specialist III
Partner - Specialist III

No problem Mustafa,

Could you please mark the anwser as correct if it helped you?

Thanks .