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

conditionally change data type.

Hi All,

I have a requirement to show specific product type sales in % values , rest in actual figures.

e.g   For B & D Prod Type , I will get 30 and 40 respectively from source, I want to show it as 30 % and 40 %

Prod_Typesales
A100
B30%
C50
D40%
E90
1 Solution

Accepted Solutions
bhargav_bhat
Creator II
Creator II

Hi Onkar,

Change number formatting in measure to Measure Expression as shown below
Capture.PNG

 

 

 

 

 

Now write this is expression

if (PROD_TYPE='B' or PROD_TYPE='D',num( Sum(Sales)/100,'##.0%'),sum(Sales))


Regards,

Bhargav

 

View solution in original post

2 Replies
bhargav_bhat
Creator II
Creator II

Hi Onkar,

Change number formatting in measure to Measure Expression as shown below
Capture.PNG

 

 

 

 

 

Now write this is expression

if (PROD_TYPE='B' or PROD_TYPE='D',num( Sum(Sales)/100,'##.0%'),sum(Sales))


Regards,

Bhargav

 

onkarkulkarni
Creator
Creator
Author

Thanks a lot Bhargav for swift reply