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

Announcements
Mastering Change Data Capture: Read Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Current Month Guages

Im am trying to create a guage wich will desplay data for the current month only. so my expression is comparing the month of what I am trying to count against the systems month using month(today()) see below:

if(QualityMonth = month(today()) , count(distinct(Qmel.QualityNotif)))

However this returns nothing and the guage is not working. Can someone tell me what I am doing wrong??



4 Replies
pover
Partner - Master
Partner - Master

Try

count( distinct if(QualityMonth = month(today()), Qmel.QualityNotif))

Regards.

johnw
Champion III
Champion III

Or more efficiently if less clearly:

count({<QualityMonth={'$(=month(today()))'}>} distinct Qmel.QualityNotif)

Not applicable
Author

I've tried this and a number of other solutions, but I'm still stuck. It's not returning the correct number. Angry

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

what is the type of your field QualityMonth? The problem is, that Month(Today()) gives you a dual (Text,Number). Try to enter a field in your script as the Number of QualityMonth:

Num(QualityMonth) as NumQualityMonth

Than anter a variable vActMonth with: =Num(Month(Today()))

Than try this:

count({<NumQualityMonth={$(vActMonth)}>} distinct Qmel.QualityNotif)