Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
shannoypaul
Creator
Creator

Pie Chart Display

Pie.jpg

LB.JPG.jpg

Hi,

ConsumerType is a field with 4 values High, Medium, Low and Very Low.

I have to consider only 3 i.e High, Medium, Low and display their respective percentages.

Please help me out.

Thanks in advance!

1 Solution

Accepted Solutions
simenkg
Specialist
Specialist

I'll add that if you somehow want to lock the choices you do it by using Set analysis.

if you dont want to show Very Low, the expressions become

Count({$<ConsumerType-={'Very Low'}>} ConsumerID) / Count(total {$<ConsumerType-={'Very Low'}>} ConsumerID)

or if you like this syntax better:
Count({$<ConsumerType={'High','Medium','Low'}>} ConsumerID) / Count(total {$<ConsumerType={'High','Medium','Low'}>} ConsumerID)

View solution in original post

4 Replies
simenkg
Specialist
Specialist

If you have ConsumerType as Dimension

and have the expression as

sum(Value) / sum( Total Value)

or
count(ConsumerID) / count(Total ConsumerID)

Now you can pick the ConsumerType from a Listbox and the chart will show the percentages between the selected ConsumerTypes

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

     You can write an calculated dimension as below.

     =if(ConsumerType = 'Very Low',null(),ConsumerType )

     Select "Supress When Value is Null"

     Go to Expression and write your expression and click on "Relative"

     Also click on "values on Data Point".

     Go to "Numbers" tab and click on the expression and select "Show in %"

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
m_woolf
Master II
Master II

Try a calculated dimension something like:

if(ConsumerType<>'Very Low',ConsumerType)

simenkg
Specialist
Specialist

I'll add that if you somehow want to lock the choices you do it by using Set analysis.

if you dont want to show Very Low, the expressions become

Count({$<ConsumerType-={'Very Low'}>} ConsumerID) / Count(total {$<ConsumerType-={'Very Low'}>} ConsumerID)

or if you like this syntax better:
Count({$<ConsumerType={'High','Medium','Low'}>} ConsumerID) / Count(total {$<ConsumerType={'High','Medium','Low'}>} ConsumerID)