Forum Discussion
sshook
2 years agoFrequent Visitor
Divide rows by specific total row
I've looked through the boards and have seen solutions that came close to what I am trying but dont work exactly. I am looking to create a % Share metric based on dividing the sales of each product...
- 2 years ago
sshook Assuming you have a production dimension with all the products, you can write the following measures to get the % and also the sum of all products at the total:
Base Measure = SUM ( Table[Sales] ) % Share = DIVIDE ( [Base Measure], CALCULATE ( [Base Measure], ALL ( ProductTable ) ) ) $ Sales for Visual = IF ( HASONEVALUE ( ProductTable[Product] ), [Base Measure], CALCULATE ( [Base Measure], ALL ( ProductTable ) ) )