The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am trying to figure out how to calculate percentage of rows because I need it for another calculation. I have a sample table that looks like this,
IDGender
101 | M |
102 | F |
103 | M |
104 | F |
105 | F |
106 | F |
107 | M |
108 | M |
109 | M |
110 | M |
115 | F |
I am trying to figure out how this is calculated my actual table has a lot of duplicates and I would the denominator to be dynamic and taking in the distinct count of the IDS. Please let me know what the possible solution would be. Thank you
Solved! Go to Solution.
Try this Measure
Measure =
DIVIDE(
DISTINCTCOUNT( 'Table'[ID] ),
CALCULATE(
DISTINCTCOUNT( 'Table'[ID] ),
ALLSELECTED()
)
)
Try this Measure
Measure =
DIVIDE(
DISTINCTCOUNT( 'Table'[ID] ),
CALCULATE(
DISTINCTCOUNT( 'Table'[ID] ),
ALLSELECTED()
)
)
This helped a lot. Thank you!
User | Count |
---|---|
12 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
13 | |
9 | |
7 |