Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ramu_i
Creator II
Creator II

Select the month value in filter , Display the up to selected values

Hi All,

I have Year and month fields and sales data.

Year   Month   Slaes

2021   1      10

2021  2     20

2021  3     20

...

Requirement :

Two filters are there Year and Month.

If select the year 2021 and Month Jan --- KPI value is : 10

If select the 2021 and Month is   Mar ---- It will display value is :30 but 

I need value is :10+20+30=60

If I select the Nov month --- Jan to Nov Data 

If select the June month --- It will display the Jan to June sales.

If select the any month it will display the Jan to selected month sales data.

Please Help Me.

Thanks Advance 

 

 

 

4 Replies
anat
Master
Master

Sum({$<year={$(=max(year))},Month={">=$(=Min(Month)<=$(=Max(Month)))"} >} Sales)

 

Ramu_i
Creator II
Creator II
Author

Hi Anat,

Thanks for solution, 

I tried but , If I select the May month, Here it's displaying may month data , not showing Jan to May month data. Here Min and Max takes the selected value not taken for the Jan to Selected value.

Thanks 

Ram 

anat
Master
Master

While taking min month bypass the current month selection

PrashantSangle

Try below

=Sum({<year={"$(=max(year))"},Month={"<=$(=max(Month))"}>}Sales)

 

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂