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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

If condition for Percentage

Hello All,

Below if condition its working for only numbers, when the list if I have percentage it’s not forking. Please suggest me.

if(PM=0,Num(num(CM),',###,###.00%'),Num(num((CM-PM))/PM,',###,###.00%'))

Untitled.png

Thanks in Advance

Niranjan

Labels (1)
3 Replies
YoussefBelloum
Champion
Champion

Hi,

would you be able to attach an excel file with some rows from your source ?

Ivan_Bozov
Luminary
Luminary

I guess you also have different field names corresponding to each of these numbers? If so, you can go like:

IF(YourDimension=FieldNameA, Num(YourExpression,'###0,0%'),

IF(YourDimension=FieldNameB, Num(YourExpression,'#.##0'),

IF(...)))

vizmind.eu
Digvijay_Singh
MVP
MVP

If you observe CM/PM number position, they are left aligned so format is text, so your condition PM=0 is not evaluating true when text value is 0.00% as its not compared numerically. May be try if Num(PM) = 0 to start your IF.