Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 217137

% of Grand Total of a Measure that use other Measures

$
0
0

Hi all, this seems so easy in my head but I haven't been able to get it for the last few hours....

 

I have a Matrix visualization that provides Cost by Hour using measures.

 

Category | Total Cost | Hours  | Cost per Hour
A        | 1000       | 10     |  100
B        | 2000       | 100    |   20
C        | 100        | 4      |   25  
D        | -500       | 100    |  -5
Total | 2600 | 214 | 12.1495

 

For my purposes I would also like to create a % of Grand Total of Cost per hour to add to a treechart visualization. However, if i simply add [Cost per Hour] to the treechart again and use the "quick clac" functionality on the field it would return 823.7% for the first record in the above table as (100/12.1495) = 8.2307. I would like this % of GT of Cost per Hour to use the total sum of the Cost per Hour column. Desired Result:

Category | Total Cost | Hours  | Cost per Hour | % of Cost per Hour
A        | 1000       | 10     |  100          | 71.4%
B        | 2000       | 100    |   20          | 14.3%
C        | 100        | 4      |   25  	       | 17.9%
D        | -500       | 100    |  -5           | -3.8%
Total    | 2600       | 214    | 12.1495       | 100%

 

A few things to note.

[Total Cost] is a Measure which adds together 5 other Measures from 5 different tables

[Hours] is a Measure which adds together a column from a table and divides by the distinct count of records in that table

[Cost per Hour] is a Measure = [Total Cost] / [Hours]

 

All of these Measures are filtered by multiple filtered visualizations and page level filters from many different tables and have a relationships created using an index number between the tables.

 

I sort of feel like this is similar to people wanting to add percentages to pie charts... I'm just trying to ascribe a real number to express the proportion displayed in the TreeChart visualization. I really hope that this is easier than it seems.


Viewing all articles
Browse latest Browse all 217137

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>