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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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:
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 20 | |
| 17 | |
| 12 |