Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone!
I was wondering if someone could help me with coding a measure. The goal of the measure is to display the percent of a group total for certain text values (when multiple groups exist). I`ve already written some code that does this successfully (see below). My issue is that, within my stage column, a large proportion of the text values are null, and unfortunately these null values are being given their own percents of the group total and are messing up the calculations for all the other non-null values (removing by basic filtering within a visualization does not solve this as the percentages are already calculated). I am still teaching myself DAX and I was hoping that someone would be able to ammend my code such that null values within the stage column are excluded when the percentages are calculated. I appreciate that this probably a straightforward fix - thanks in advance!
Percent with different BPs = DIVIDE ( COUNTA ( 'BloodPressureStatus'[Patient.ID]), CALCULATE ( COUNTA ( 'BloodPressureStatus'[Patient.ID]), ALL( 'BloodPressureStatus'[stage]) ))
Solved! Go to Solution.
Hi,
Thanks for the reply! I was able to solve my issue with a simple fix. I just did a power query and excluded the "null" values from the [stage] column - not sure why I didn't think of it before. I appreciate your help regardless!
Hi,
Share some data and show the expected result.
Hi,
Share the link from where i can download your PBI file and please also show the expected result there. Show the resul in a simple Table. Once we have the correct figures in a Table, a graph can be easily created.
Hi,
Thanks for the reply! I was able to solve my issue with a simple fix. I just did a power query and excluded the "null" values from the [stage] column - not sure why I didn't think of it before. I appreciate your help regardless!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |