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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Ravi_Nagmal
Contributor III
Contributor III

IF statement with measure Variable

Hi All,

I am working on creating measure where variable is already created but now i want to restrict that data based on Yesterday's data and Current month data

Variable: $(vOverall_Inquiry_Count) where we are just doing sum(inquiry_number), we cannot change logic in variable hence i am try to apply set analysis outside variable on Qlik Saas.

Tried some thing like below but not sure if this is the correct way.

{<[Received_Date.autoCalendar.Date]={"$(=Date(Today()-20, 'MM/DD/YYYY'))"}>} $(vOverall_Inquiry_Count)

Please help

 

Labels (6)
2 Replies
Or
MVP
MVP

From a syntax perspective, that looks like it should work correctly. I'm not sure why you've chosen today()-20 as your cutoff - that's not "Yesterday and current month" - but that's not related to the use of variables and set analysis.

If you're using Qlik Sense, you'll probably want to use a Master Measure for your formula, rather than a variable, but a variable will also work.

Ravi_Nagmal
Contributor III
Contributor III
Author

@Or I tried creating master measure as well, but it not working