Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
dhananjay_capge
Partner
Partner

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

Test

2 Replies
jonathandienst
Partner
Partner

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
greeshma_k
Creator III
Creator III

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