Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
RutiTaumanRubin
Creator
Creator

Issue with num function in if conditional

Hi,

I have the following measure in extension Simple KPI:

if(GetFieldSelections([Type])='Percent',

num(count(distinct APP_ID)/100,'#,##0%')

,num(count(distinct APP_ID),'#,##0')

)

I defined the number formatting as measure expression , but the percent doesn't work

If i just write num(count(distinct APP_ID)/100,'#,##0%') - not in if conditional -  it works..


Could you please advise?


Thank you!

Ruti

14 Replies
sunny_talwar

What do you get when you use it within the if condition and outside of if condition?

RutiTaumanRubin
Creator
Creator
Author

Hi,

With if condition -  27

Without  if condition - 27 %

sunny_talwar

Are you sure the Type = 'Percent'?

RutiTaumanRubin
Creator
Creator
Author

Yes, even I write :

if(1=1, num(count( APP_ID),'#,##0%'))

it doesn't work..

ychaitanya
Creator III
Creator III

Have you tried with Standard KPI Object and not your extension ?

It worked in normal  KPI Object for me , if it didn't work in extension , there seems to be some issue with Extension standard defaulting of the Object

RutiTaumanRubin
Creator
Creator
Author

Thank you for your help!

It's work for me in the standart KPI but I need background to the object and I don't have it in the standard KPI...

ychaitanya
Creator III
Creator III

Can you try calculating the count()/100 and concatenating % , May be that would help ?

RutiTaumanRubin
Creator
Creator
Author

I have tried this option but it didn't work...

Digvijay_Singh

Looks like a bug to me, try using variable for '#,##0%', something like $(vPercentFormat).