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

Announcements
Catch up on the newest Qlik features and improvements: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
profilejamesbond
Creator II
Creator II

Qlik SaaS - straight table show only last month data

Hi,

I created straight table in the Qlik Sense without any Expression. The table contains raw data therefore, all the fields are dimensions.

I created one flag_LastMonth for the last month data in the calendar.

Now, I would like to last month data in the straight table with this flag. Without this flag, the table shows all the data from 2020.

 

How to fix this thing?

 

Thanks

Labels (3)
2 Replies
profilejamesbond
Creator II
Creator II
Author

I think that is working 

=If (flag = 1, field)

un-Checked  -> include null values (date field dimension)

nevopotokcloudinary
Creator
Creator

We had the same challenge in SaaS with a straight table showing all historic data instead of just last month. What worked for us:
• Create a flag in the data model like Flag_LastMonth = If(DateField >= MonthStart(AddMonths(Max(TOTAL DateField),-1)) and DateField <= MonthEnd(AddMonths(Max(TOTAL DateField),-1)),1,0).
• Then in the table use that flag as a dimension filter or in the measure set-analysis to only include rows where Flag_LastMonth=1.
• Also uncheck “Show zero values” under Data Handling so rows that don’t meet the flag are hidden.

It’s not totally seamless (you’ll need the flag logic maintained in the model), but it gives the correct “just last month” view until there’s a built-in toggle for it.