What dimensions have been used for calculating rank please?
Rank([Finance Makes % of Total], 'desc')
i.e. ranking the makes by the dark blue bar
ok so basically we need to display the number of makes sold as a percentage of total (PoT) and the PoT should get updated as the view changes due to filter conditions.
We can achieve this by adding a quick table calculation on Sales (or equivalent measure in your data). Please see attached snapshot where I have charted sales as a PoT for sub category of products. I then added Sub category to filter. As I keep changing the filter, the PoT values change such that the view total is always 100%.
Hope it helps!
PERCENTAGE_OF_TOTAL.docx 139.9 KB
Thanks for the reply, unfortunately this doesn't work as this is what i attempted to do before hand.
The measurement we are using is a calculated field showing the number of vehicles that were financed i.e
Total finance units calc is
if [Vehicle Finance] = "Financed"
Then 1 END
This would then show of all the financed vehicles, what proportion of the top x makes for finance falls under each make using the rank filter to adjust their view (so that they can choose to select how many of the top vehicles they would like to look at).
But for some reason this doesn't work as it always shows the proportion of all the financed vehicle makes, not just the top x which they choose:
The dark blue dots should be showing 50% each on this view.
Thanks for your response,
Hi Nathan, are you able to post a packaged workbook?
Have you tried using the rank as a context filter?
The %s are fixed regardless of the Top X filter selection because it's a table calculation filter. The % of total is calculated before the rank filter is applied, hence they stay static (which is actually very useful for many use cases - just not this one).
Therefore you would need to change the way you filter for the Top X to make it a non- table calculation filter. Hopefully this is possible using your dataset.
Try dragging Make to filters and setting the 'Top X' within that filter window instead. You are able to set the Top X by either formula or by field within the Filter view of Make.
Remove the rank filter from the filters shelf.
This worked! Thanks for the help!
I am connecting to SSRS cube/live connection and it has limited functionalities -
Task : I have to have sales office , Yoy % Avg rate and yoy % CPM rate on teh report and advertiser name is driving the top N selector and this shouldn't be in report.
Problem : Tableau is getting top N for each sales office ( advertiser can be in all the sales office ) then showing same advertisers in each sales office - The issue here is the issue here is I am getting all the advertiser names even though they ha
ve null revenue in other sales office ( In Brazil squirrel global media has some revenue but where as in Argentina it has zero ). The problem in order to see top 10 advertisers I have to put Top 90 ( 9 sales offices * 10 top ) in the parameter.
How do I get rid of the advertisers with no revenue and connect to my Top N parameter. Please let me know if you need any additional info in this regards
Tried adding formula Calculation 2
IF ISNULL([Gross Revenue])
THEN 0 ELSE 1 END
but this is not helping me to remove the advertisers with null gross revenue in each sales office.
After using rank I am able to achieve below but cannot do a grand total and i do not want advertiser name in the report ( i cannot hide it as i do not see hide option )