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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
arpita
Contributor III
Contributor III

Show only Current Month Data in Charts

Hi

I have data for multiple months and My script looks like below. I need to have all the month data in some charts and only latest month data few charts. How do I filter charts with only latest month data. (my latest month is previous month which as on date will be Nov 2020)

FXVOls:
LOAD
Status,
Product,
[Last Amend Date],
[Trading_Entity],
Date(Date#(mid(FileName(),46,2)&'/'&mid(FileName(),42,4),'MM/YYYY'),'MMM-YYYY') as Year _Month,
FROM
$(file)
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

 

1 Reply
Nicole-Smith

I would create a variable on the front-end named vLatestMonth and set it to equal the following expression:
=maxstring(Year_Month)

Then in your expressions/measures for the charts you only want to show latest month, you would add logic to the set analysis like the following:
sum({<Year_Month={'$(vLatestMonth)'}>}Sales)