Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Below is my Dax formula:
Medical Score =
Solved! Go to Solution.
Hi @Michael_DOC - you can modify the logic to filter out blank values in the FIRSTNONBLANK part of your measure.
ceck the below measure:
Medical Score =
VAR ClosestRow =
CALCULATE (
FIRSTNONBLANK(
SCORES[SCOR_MEDICAL],
NOT (ISBLANK(SCORES[SCOR_MEDICAL])) // Exclude blank values
),
FILTER (
SCORES,
SCORES[SCOR_PER_ID] = PS[Number] &&
ABS(DATEDIFF(PS[OffenseDt], SCORES[SCOR_EFF_DATE], DAY)) =
MINX (
FILTER (
SCORES,
SCORES[SCOR_PER_ID] = PS[Number] &&
NOT (ISBLANK(SCORES[SCOR_MEDICAL])) // Exclude blank values in comparison
),
ABS(DATEDIFF(PS[OffenseDt], SCORES[SCOR_EFF_DATE], DAY))
)
)
)
RETURN
ClosestRow
Hope it works
Proud to be a Super User! | |
Hi @Michael_DOC - you can modify the logic to filter out blank values in the FIRSTNONBLANK part of your measure.
ceck the below measure:
Medical Score =
VAR ClosestRow =
CALCULATE (
FIRSTNONBLANK(
SCORES[SCOR_MEDICAL],
NOT (ISBLANK(SCORES[SCOR_MEDICAL])) // Exclude blank values
),
FILTER (
SCORES,
SCORES[SCOR_PER_ID] = PS[Number] &&
ABS(DATEDIFF(PS[OffenseDt], SCORES[SCOR_EFF_DATE], DAY)) =
MINX (
FILTER (
SCORES,
SCORES[SCOR_PER_ID] = PS[Number] &&
NOT (ISBLANK(SCORES[SCOR_MEDICAL])) // Exclude blank values in comparison
),
ABS(DATEDIFF(PS[OffenseDt], SCORES[SCOR_EFF_DATE], DAY))
)
)
)
RETURN
ClosestRow
Hope it works
Proud to be a Super User! | |
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 65 | |
| 45 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 115 | |
| 114 | |
| 38 | |
| 36 | |
| 26 |