Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
carolinarodrigues
Contributor II
Contributor II

Set Analysis - How to do a percentage comparison

I have an expression with some criteria that is working just fine but it gets errors when I try to change the comparison to show the difference vs the previous year in percentage. What am I doing wrong?

Original expression is : (Count({<[Employee Type]={"Permanent"},[Status]={"Active","Leave of absence"},[Status],[Reporting Month]={"Dec-22"}>}[Updated BU])/Count({<[Employee Type]={"Permanent"},[Status]={"Active","Leave of absence"},[Status],[Reporting Month]={"Dec-21"}>}[Updated BU])-1)*100

I tried adding the % but I got an error.

num(Count(({<[Employee Type]={"Permanent"},[Status]={"Active","Leave of absence"},[Status],[Reporting Month]={"Dec-22"}>}[Updated BU])/Count({<[Employee Type]={"Permanent"},[Status]={"Active","Leave of absence"},[Status],[Reporting Month]={"Dec-21"}>}[Updated BU])),'#,##0%')

Any tip or suggestion will be appreciated as I am kinda confused at this point.

Labels (1)
1 Reply
rubenmarin

Hi, try setting the number format to your full current expresssion (only remove the *100):

Num((Count({<[Employee Type]={"Permanent"},[Status]={"Active","Leave of absence"},[Status],[Reporting Month]={"Dec-22"}>}[Updated BU])/Count({<[Employee Type]={"Permanent"},[Status]={"Active","Leave of absence"},[Status],[Reporting Month]={"Dec-21"}>}[Updated BU])-1),'#,##0%')