The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I am trying to create a single measure which I can apply visual filters to to show the below data. Patients are recording 4 metrics on a daily basis: weight, pulse ox, blood pressure, and temperature. For this patient dashboard, we want to show the most current reading of each metric. What is making this tricky for me is that not every patient will always submit all 4 metrics on the same day, but I want the measure to display whatever the most current reading is for each one (could be from different dates).
My efforts so far have landed me below:
I would want the weight to display the metric input from 6/9. Also, this patient did not submit EITHER of the blood pressure metrics, yet one is displaying accurately per his latest reading, the other N/A.
The data is structured as such, where the value represents the reading.
My current measure is not working.
Any ideas how to beef this up?
Thanks!
Solved! Go to Solution.
Hi @SGiambrone ,
You can create a measure as below to get the recent value for per health action type. I created a sample pbix file for you, you can get it from this link. Actually, I create two measures to get the values. Please check which one is what you exactly need.
Latest value =
VAR _patientid =
MAX ( 'HealthActionDataSample'[Patient ID] )
VAR _healthaction =
MAX ( 'HealthActionDataSample'[Health Action] )
VAR _curdate =
MAX ( HealthActionDataSample[Date Completed] )
RETURN
CALCULATE (
MAX ( HealthActionDataSample[Value] ),
FILTER (
HealthActionDataSample,
'HealthActionDataSample'[Patient ID] = _patientid
&& 'HealthActionDataSample'[Health Action] = _healthaction
&& HealthActionDataSample[Date Completed] = _curdate
)
)
Best Regards
Rena
Hi @SGiambrone ,
You can create a measure as below to get the recent value for per health action type. I created a sample pbix file for you, you can get it from this link. Actually, I create two measures to get the values. Please check which one is what you exactly need.
Latest value =
VAR _patientid =
MAX ( 'HealthActionDataSample'[Patient ID] )
VAR _healthaction =
MAX ( 'HealthActionDataSample'[Health Action] )
VAR _curdate =
MAX ( HealthActionDataSample[Date Completed] )
RETURN
CALCULATE (
MAX ( HealthActionDataSample[Value] ),
FILTER (
HealthActionDataSample,
'HealthActionDataSample'[Patient ID] = _patientid
&& 'HealthActionDataSample'[Health Action] = _healthaction
&& HealthActionDataSample[Date Completed] = _curdate
)
)
Best Regards
Rena
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
99 | |
94 | |
85 | |
69 | |
65 |
User | Count |
---|---|
244 | |
128 | |
119 | |
82 | |
78 |