Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
In my source data, there are multiple rows per ID number. I have a simple table visual showing certain values that correspond to that ID number. I want to filter that visual so each ID number only appears once, according to specific criteria. I am pasting dummy sample data below to make this clearer. What I am looking for is the column B value for each ID in column A - however, I only want one single B value for each ID in column A, although my source data has multiple rows with multiple values. If column C is UF, that is the value I want. If there is no UF for a particular ID, then I want the max value that is in B. I have no idea how to do it!
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a measure.
WINDOW function (DAX) - DAX | Microsoft Learn
expected result measure: =
VAR _partitionuf =
FILTER (
WINDOW (
1,
ABS,
-1,
ABS,
ALL ( data ),
ORDERBY ( data[value], DESC ),
,
PARTITIONBY ( data[id] ),
MATCHBY ( data[id], data[value], data[condition] )
),
data[condition] = "uf"
)
VAR _partitionall =
WINDOW (
1,
ABS,
1,
ABS,
ALL ( data ),
ORDERBY ( data[value], DESC ),
,
PARTITIONBY ( data[id] ),
MATCHBY ( data[id], data[value], data[condition] )
)
RETURN
IF (
COUNTROWS ( _partitionuf ) >= 1,
MAXX ( _partitionuf, data[value] ),
MAXX ( _partitionall, data[value] )
)
Hi,
Please check the below picture and the attached pbix file.
It is for creating a measure.
WINDOW function (DAX) - DAX | Microsoft Learn
expected result measure: =
VAR _partitionuf =
FILTER (
WINDOW (
1,
ABS,
-1,
ABS,
ALL ( data ),
ORDERBY ( data[value], DESC ),
,
PARTITIONBY ( data[id] ),
MATCHBY ( data[id], data[value], data[condition] )
),
data[condition] = "uf"
)
VAR _partitionall =
WINDOW (
1,
ABS,
1,
ABS,
ALL ( data ),
ORDERBY ( data[value], DESC ),
,
PARTITIONBY ( data[id] ),
MATCHBY ( data[id], data[value], data[condition] )
)
RETURN
IF (
COUNTROWS ( _partitionuf ) >= 1,
MAXX ( _partitionuf, data[value] ),
MAXX ( _partitionall, data[value] )
)
Try this if you need a measure:
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.