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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Sagar082
Creator
Creator

How to incorporate measures in if condition to compute new variable

Hi folks,

Greeting for the day.  I want to create new variable on the bases of measurement.

I'm using table in the dashboard, and need to create variable Operation somewhat like below,

If(count(id) <> "-", "50%", "100%")

Can some one help on this, also would like to know is it feasible to compute?

3 Replies
Or
MVP
MVP

I'm not sure what exactly you're trying to achieve - your formula will always return 50% since count(id) is always going to be a numeric value, never a dash. Could you be more specific as to what exactly you're trying to do?

Sagar082
Creator
Creator
Author

Yes, I will explain. But, I apologize, I committed a mistake. You are right it is not dash, but it is zero.

The intention is if there is no incidence then branch isn100% operational and that should be refelct

Can you please advise.

Or
MVP
MVP

Where will this expression be placed? If it is placed in a table/chart where Branch is the dimension,

if(Count(ID)=0,'100%','50%') should work