Discussion board where members can get started with Qlik Sense.
I have a data set like below.
I want a bar graph and want to limit bars to show only 3 bars with a condition when the gross marging% is higher than 20%.
and secondly i want to sort those bars with an expression - Sum(Revenue).
Gross Margin %(Measurement) - > (Sum(Cost1)+Sum(Cost2)+sum(Cost3))/sum(Revenue)
CustomerName (Dimension) - CustomerName
Do you have sample you can share?
please find attached the qvf file.
In the first bar graph, the sorting order is ok. I just want to show the first two customer (HP and Orange)
Maybe like this?
can you please share the complete details, how you did it.
if you have used set analysis by entering customer names, then it will not work for me as i have many customers and i cant enter their names in set analysis
Goto Dimensions, there you can see Limitation. It will be in No limitation. select the dropdown arrow and Select exact value or Relative and give the limitation.
For sorting, Goto Sorting, then Drag the Dimension to the Top and uncheck the auto sort and select sort by expression. then enter the expression.
The QVF is attached to my previous post, just go through the settings of the charts.
It's mainly a matter of
1) limit the customers using set analysis (but not listing the explicite values, it's a dynamic search based on Revenue rank and margin threshold)
If you want to have the set analysis consider your current customer selection, you can add the intersection operator * to the field modifier (I've done only this change in attached document).
2) Sorting the customers by Sum(Revenue) desc
3) disabling add-on / data handling option 'Show NULL/zero values'
I think the problem is that t is required to consider the sorting when limiting to top3 dimension values.
I couldn't make this work by just using the dimension limit option, since it will look at the expression to limit the values only.
If you could make it work, please post a sample QVF.
this is working. but i am not able to identify, how you limit the bars to 2 in your first bar chart.
But anyway many thanks this set analysis is perfectly working as per my requirement.