Forum Discussion
russm
Helper I
10 years agoCalculating proportions with DAX
I’m having trouble “thinking in DAX” WRT describing proportions. I have two tables. A table that defines a taxonomy of categories (Dictionary)[Category] and unique issues (Dictionary)[All Issues]....
- 10 years ago
russm - With the data you posted, I created 2 new columns in Dictionary:
Count of Issues = CALCULATE(COUNTROWS(DISTINCT(Verbatims[UUID])),RELATEDTABLE(Verbatims))
Percent of Issues = [Count of Issues] / COUNTROWS(DISTINCT(Verbatims[UUID]))
I get the visualization:
I think I like Sean's better as it shows the total unique (6) and the percentage comes out to 100%. I guess it is just what makes more sense to your users, not all of the issues adding up to 9 or having 150%. Or, just turn off the totals row and don't tell them.
- 10 years ago
Sean - Assuming that your formulas are for measures, correct?
- 10 years ago
Yes all Measures.
Greg_Deckler
Community Champion
10 years agoSean - Assuming that your formulas are for measures, correct?
russm
Helper I
10 years agoThank you. This does work against my example. The ratios are a little off when applied to my actual data model. I think I have some ALLEXCEPT work to do which goes beyond the scope of the original ask.