Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Set Analysis with Multiple Conditions

Hi

I am trying to get the below to return a %. I get the correct outcome although it is displayed as a decimal and not a %. Any ideas?

=num(count({<CourseName={'*Performance and Development Plan (PAD)'},status={'Enrolled'}>}[IDM Nbr])+
Count({<CourseName={'*Performance and Development Plan (PAD)'},TrainingStatus={'Not Current'}>}[IDM Nbr]))/
  num(count({<CourseName={'*Performance and Development Plan (PAD)'}>}[IDM Nbr]),'%')

Cheers, Andrew

1 Solution

Accepted Solutions
Contributor II
Contributor II

 

Got it – I needed to have the percentage num expression wrap around the entire expression.  Added sections highlighted in yellow.

 

 

=num(num(count({<CourseName={'*Performance and Development Plan (PAD)'},status={'Enrolled'}>}[IDM Nbr])+ Count({<CourseName={'*Performance and Development Plan (PAD)'},TrainingStatus={'Not Current'}>}[IDM Nbr]))/

num(count({<CourseName={'*Performance and Development Plan (PAD)'}>}[IDM Nbr])),'##.##%')

View solution in original post

11 Replies
Master III
Master III

try like this

num(count({<CourseName={'*Performance and Development Plan (PAD)'},status={'Enrolled'}>}[IDM Nbr])+

Count({<CourseName={'*Performance and Development Plan (PAD)'},TrainingStatus={'Not Current'}>}[IDM Nbr]))/

  num(count({<CourseName={'*Performance and Development Plan (PAD)'}>}[IDM Nbr]),'#,##%')

Contributor II
Contributor II

Hi Arul

Thanks. I have tried with '##.##%' and as you have noted above, however it continues to return a decimal only.

Master III
Master III

may be like this and can you share a sample

num(count({<CourseName={'*Performance and Development Plan (PAD)'},status={'Enrolled'}>}[IDM Nbr])+

Count({<CourseName={'*Performance and Development Plan (PAD)'},TrainingStatus={'Not Current'}>}[IDM Nbr]))/

  num(count({<CourseName={'*Performance and Development Plan (PAD)'}>}Total [IDM Nbr]),'#,##%')

Creator II
Creator II

Hi Andrew,

   What the Arul saying is correct or select Show in Percent% in Number tab both are same . Can you share your app

Partner
Partner

maybe this:

=num(

(

count( {<CourseName={'*Performance and Development Plan (PAD)'},status={'Enrolled'}>}[IDM Nbr] )

+

Count( {<CourseName={'*Performance and Development Plan (PAD)'},TrainingStatus={'Not Current'}>}[IDM Nbr] )

)

/

count( {<CourseName={'*Performance and Development Plan (PAD)'}>}[IDM Nbr] )

,'#,##0%')

Is this in a chart? If it is, can you check what have you selected on the Number's tab of the chart properties? Make sure you have selected 'Expression Default'.

Partner
Partner

You can remove num functions from your measures and set the formating of the measure to Number and Percentage.measure.PNG

Contributor II
Contributor II

Hi Sunny

I am using this in a text object. I probably should have mentioned I am using Qlikview also.

Creator II
Creator II

Hi Andrew:

Try This:

=num(

((count({<CourseName={'*Performance and Development Plan (PAD)'},status={'Enrolled'}>}[IDM Nbr])

+

Count({<CourseName={'*Performance and Development Plan (PAD)'},TrainingStatus={'Not Current'}>}[IDM Nbr]))

/

count({<CourseName={'*Performance and Development Plan (PAD)'}>}[IDM Nbr])),'#,##0%')