Forum Discussion
Dvision with mutiple values
Dear Team
I have below table with two columns where first column has various key items and second field has its respective values.
I want to create measure by adding another column /field (% of Sales) in this table which gives me % of each item against one key item value which is "Sales" here
For explanation purpse I have give answers for few key items in column 3 (% of Sales) but I need to know to develop measure which can give me this kind of result in one column
| Key Items | Values | % of Sales |
| Sales | 5000 | 100 |
| Cost of Sales | 3000 | 60 |
| Gross Profit | 2000 | 40 |
| Admin Cost | 500 | |
| Marketing Cost | 700 | |
| Depreciation | 300 | |
| Net Pofit |
Hi GGDAC ,
Try this:
1. Creating a calculated column
Sales = CALCULATE( MAX(Sheet1[Values]), FILTER( Sheet1, Sheet1[Key Items] = "Sales" ) )2. Creating a measure
Measure = DIVIDE( MAX(Sheet1[Values]), MAX(Sheet1[Sales]) )If the value of the “Sales“ is always maximum, you can also do like this:
Measure 2 = DIVIDE( MAX(Sheet1[Values]), CALCULATE( MAX(Sheet1[Values]), ALL(Sheet1) ) )Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- amitchandak
Super User
GGDAC , can you explain this 100% calculation and these are columns or measures or the dimension values
- GGDAC
Helper I
Dear Amit
This 100% is the measure which I want to add in my table as another column
- v-lionel-msft
Community Support
Hi GGDAC ,
Try this:
1. Creating a calculated column
Sales = CALCULATE( MAX(Sheet1[Values]), FILTER( Sheet1, Sheet1[Key Items] = "Sales" ) )2. Creating a measure
Measure = DIVIDE( MAX(Sheet1[Values]), MAX(Sheet1[Sales]) )If the value of the “Sales“ is always maximum, you can also do like this:
Measure 2 = DIVIDE( MAX(Sheet1[Values]), CALCULATE( MAX(Sheet1[Values]), ALL(Sheet1) ) )Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Ashish_Mathur
Super User
Hi,
Try these measures
Measure = SUM(Data[Values])Measure 2 = [Measure]/CALCULATE([Measure],Data[Key Items]="Sales")Hope this helps.