Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mrthomasshelby
Creator III
Creator III

Display dimension values based on condition

Hello,

I have a bar chart in the sample qvf attached. Now what I'd like to do is only display the 'Codes' in the bar chart which have measures 'Type C'>0 or 'Type N 80%'>0. Also, if possible I only want to display the 'Total Sales' measure on the bar chart while displaying the measures 'Type C' and 'Type N 80%' in the tool tip or any other work around like using a different type of chart is fine too. Will really appreciate the help on this. TIA!

kaushik.solankistalwar1

Labels (1)
  • Chart

1 Solution

Accepted Solutions
sunny_talwar

May be this

If(Column(1) > 0 or Column(2) > 0,

Pick(Match(ValueList('Top 80 N'), 'Top 80 N'),

Sum({<Vendor,

Code = {"=Count(DISTINCT {<Vendor = {""=Sum({<Vendor>}Aggr(Rangesum(Above(Sum({<Vendor>} Sales)/Sum({<Vendor>} TOTAL Sales), 0, RowNo())), (Vendor,(=Sum({<Vendor>} Sales),Desc)))) > 0.8""}, Type = {'N'}, Type1 = {'M'}>}Code) >= 1"},

Vendor = {"=Sum({<Vendor>}Aggr(Rangesum(Above(Sum({<Vendor>} Sales)/Sum({<Vendor>} TOTAL Sales), 0, RowNo())), (Vendor,(=Sum({<Vendor>} Sales),Desc)))) >= 0.8"},

Type = {'N'}>} Sales)))

View solution in original post

4 Replies
sunny_talwar

Not sure I understand what you are looking to get here. Can you explain using some screenshots what is wrong or what are you trying to do?

mrthomasshelby
Creator III
Creator III
Author

In the bar chart in the app, all the codes in the Bottom 20% are being displayed. What I want instead is to only display the codes for which at least one of the measures 'Type C' or 'Type N 80%' >0. For example, the Code 90007052 has 0 under both 'Type C' and 'Type N 80%'. So it should not be displayed in the bar chart. In short, all the codes that have 0 under both 'Type C' and 'Type N 80%' should not be displayed in the chart. This is the main objective.

Now if possible, what I want to display on the bar chart which contains only codes that have at least one of 'Type C' or 'Type N 80%'>0 is the measure 'Total Sales' corresponding to that Code. Then show the measures 'Type C' and 'Type N 80%' as well on the tool tip or something similar. Thanks!

sunny_talwar

May be this

If(Column(1) > 0 or Column(2) > 0,

Pick(Match(ValueList('Top 80 N'), 'Top 80 N'),

Sum({<Vendor,

Code = {"=Count(DISTINCT {<Vendor = {""=Sum({<Vendor>}Aggr(Rangesum(Above(Sum({<Vendor>} Sales)/Sum({<Vendor>} TOTAL Sales), 0, RowNo())), (Vendor,(=Sum({<Vendor>} Sales),Desc)))) > 0.8""}, Type = {'N'}, Type1 = {'M'}>}Code) >= 1"},

Vendor = {"=Sum({<Vendor>}Aggr(Rangesum(Above(Sum({<Vendor>} Sales)/Sum({<Vendor>} TOTAL Sales), 0, RowNo())), (Vendor,(=Sum({<Vendor>} Sales),Desc)))) >= 0.8"},

Type = {'N'}>} Sales)))

mrthomasshelby
Creator III
Creator III
Author

This was exactly what I was looking for. Thanks a lot!