Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
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
Country | Customers | Revenue | Cost1 | Cost2 | Cost3 |
Ind | Orang | 100 | 43 | 0 | 7 |
Rus | Bharti | 2000 | 54 | 545 | 34 |
Ind | Rel | 100 | 12 | 3 | 4 |
Rus | HP | 500 | 54 | 11 | 35 |
America | Orang | 2343 | 454 | 333 | 35 |
EMEA | Bharti | 3423 | 755 | 534 | 3 |
Pak | Rel | 645 | 76 | 34 | 4 |
Bang | HP | 5477 | 343 | 435 | 345 |
America | Kelvinator | 100 | 45 | 4 | 3 |
EMEA | wirlpool | 2000 | 687 | 43 | 354 |
Pak | Orang | 100 | 23 | 3 | 4 |
Bang | Bharti | 500 | 242 | 32 | 23 |
EMEA | Rel | 6000 | 464 | 32 | 2 |
My | Orang | 5345 | 432 | 342 | 54 |
Afganistan | Bharti | 453 | 34 | 23 | 4 |
Lebanon | Rel | 234 | 3 | 4 | 6 |
Afganistan | HP | 3454 | 435 | 343 | 111 |
Regards
Prasanta
Ok, so what about the sample I've attached to my previous post?
yes, thats working.
But if you check, in you expression we are saying lets say <=3, which means we should have 3 bars.
But in you qvf, its showing 2 bars only.
Well, that's what you asked for in your first requested chart, right?
You've defined a condition combined of
a) TOP3 Revenue
and
b) Margin > 20%
=Rank(Sum(Revenue))<=3 and (Sum(Cost1+Cost2+Cost3)/Sum(Revenue)>=0.2)"}
From the three TOP3 Revenue customers, only 2 showed margin >20%
This is how I interpreted your requested chart (the one that showed the two bars)
Hi,
can you please check this new one that i created for some more suggestion around.
here is the link.
i am still struggling to fix this issue.