Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dhananjay_capge
Partner - Contributor III
Partner - Contributor III

How to calculate count of months(Number of months) dynamically.

Test

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

This should work (change the field names to match your model):

Count({<Year = {'$(=Max(Year))'}>} Distinct Month)

Max(Year) will return the last year on file, if nothing is selected, or the selected year if one is selected.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable

if(GetFieldSelections(Year) = year(today()), SubField(today(),'/',1),12)