Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi i am doing simple count
count(id) and for ratio count(id)/count(total id)
count(total Id) is incorrect.
in straight table i checked.in properties expression tab if i use Expression as total it showing correct.
how to do this bar chart.
Note: i am using cyclic group in dimension
On the Chart's Dimension Limits tab it has a limit set to only show the Largest 10 values. If you tick Show Others then the Total shown with match the sum of the numbers below.
hi Bill i need to show Top 10 vech
orginal code is
If(Rank(count({<BW_FM_DT_YEAR={$(=max(BW_FM_DT_YEAR))}>}BW_VEH_ID)) <= 10,Count({<BW_FM_DT_YEAR={$(=max(BW_FM_DT_YEAR))}>}BW_VEH_ID))
to find ratio i did like this
If(Rank(count({<BW_FM_DT_YEAR={$(=max(BW_FM_DT_YEAR))}>}BW_VEH_ID)) <= 10,Count({<BW_FM_DT_YEAR={$(=max(BW_FM_DT_YEAR))}>}Total BW_VEH_ID))
Hi,
Total will take all the values irrespective of dimension limits.
Check this file.
Regards,
jagan.
Your Set Analysis is warping the total. Try removing it :
If(Rank(count(BW_VEH_ID)) <= 10,Count(BW_VEH_ID))
hi Jagan
result shold be like this in bar chart
Make | Count | ratio |
Honda | 3153 | 10% |
BMW | 1360 | 4% |
Mercedes | 1657 | 5% |
Mitsubishi | 4900 | 16% |
Kia | 898 | 3% |
Toyota | 8785 | 28% |
Nissan | 6753 | 22% |
Hyundai | 860 | 3% |
Chevrolet | 1606 | 5% |
GMC | 1085 | 3% |
Totals | 31057 |
|
... or maybe more efficient with this Set Analysis :
Count({<BW_MAKE_DESC = {"=rank(Count(BW_VEH_ID))<= 10"}>} BW_VEH_ID)
Use below
Straight Table
Dimension
BW_MAKE_DESC
Expressions
1)
COUNT({<BW_MAKE_DESC = {"=Rank(COUNT(BW_VEH_ID))<=10"}>}BW_VEH_ID)
Total Mode Select Sum of Rows
2)
COUNT({<BW_MAKE_DESC = {"=Rank(COUNT(BW_VEH_ID))<=10"}>}BW_VEH_ID)/COUNT(TOTAL{<BW_MAKE_DESC = {"=Rank(COUNT(BW_VEH_ID))<=10"}>}BW_VEH_ID)
for ratio use expression
If(Rank(count(BW_VEH_ID), 4, 1) <= 10,
count(BW_VEH_ID)
/sum(TOTAL aggr(If(Rank(count(BW_VEH_ID), 4, 1) <= 10,count(BW_VEH_ID)) ,BW_MAKE_DESC) )
)
Change this setting for your expression and you will have what you want