Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
clemmo
Frequent Visitor

Determining Adherence for building based on patient level data

I have patient level data and have used the following Dax formula to determine a building's adherence to a metric. 

 

SPPB Adherence BL (Baseline) = if([SPPB Adherence PC]=BLANK(),BLANK(),round(sumx(filter(v_Inf_ResidentOutcomes,v_Inf_ResidentOutcomes[LibraryItemCaption]="Was SPPB Administered?"),v_Inf_ResidentOutcomes[PT initial value adjusted])/[SPPB Adherence PC]-1,1))

 

Now, I need to determine the percentage of buildings who are being adherent (reaching 80% adherence for a specified metric).  Since the formula above is a measure, not a column, I cannot figure out how to do this.

 

Please help!

 

Thanks!

2 REPLIES 2
v-caliao-msft
Microsoft Employee
Microsoft Employee

@clemmo,

 

Could you please provide us some sample data, so that we can make further analysis.

 

Generally, we can add the measure to filter pane.
Capture.PNG

 

Regards,

Charlie Liao

Here is an example of the data set.  There is obviously so much more, but these are the key pieces.

 

Site:                       Resident:           Metric:                  Intitial Score      End  Score

Bldg A                    1                         Gait Speed             1                          2

Bldg A                    2                         Gait Speed             2                          2

Bldg A                    3                         Gait Speed             1                          1

Bldg B                    4                         Grip Strength         2                          2

Bldg B                    5                         Grip Strength         2                          2

Bldg B                    6                         Grip Strength         2                          2

 

 

Rolled up data:

Site:                        Metric               Adherence

Bldg A                     Gait Speed          80%

Bldg B                     Gait Speed          60% 

 

The data is at a patient/ resident level, but I am rolling it up to a site level using the measure I put in my original post.  The 2's and 1's represent a yes or no depending on whether the metric was performed on each resident.  Based on my site rollup measure, I need to then determine of those buildings, how many scored 80% compared to all sites.  This represents the % of adherent sites.  If the data was all at a site level, it would be easy, I would add a column with an if statement and then use a count of adherent sites divided by all sites.  The patient level data is confusing me...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.