This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi
I am new to DAX and I would like to know how I can fix this
I have the following sample dataset
| ID | X | Y | Length |
| 1 | 0.321 | False | 100 |
| 1 | 0.375 | False | 150 |
| 1 | 0.425 | False | 200 |
| 1 | 0.257 | TRUE | 275 |
| 1 | 0.309 | False | 300 |
| 1 | 0.2948 | False | 125 |
| 1 | 0.2806 | TRUE | 95 |
| 2 | 0.2664 | False | 225 |
| 2 | 0.2522 | False | 205 |
| 2 | 0.238 | False | 210 |
| 2 | 0.2238 | False | 215 |
| 2 | 0.2096 | False | 219 |
| 2 | 0.1954 | False | 224 |
| 3 | 0.1812 | TRUE | 229 |
| 3 | 0.167 | False | 234 |
| 3 | 0.1528 | False | 239 |
| 3 | 0.1386 | False | 243 |
| 3 | 0.1244 | False | 248 |
| 4 | 0.1102 | True | 253 |
| 4 | 0.096 | True | 258 |
| 4 | 0.0818 | True | 262 |
| 4 | 0.0676 | False | 267 |
| 4 | 0.0534 | False | 272 |
| 4 | 0.0392 | False | 277 |
and I would like to know how to create the following grid using DAX
| ID | X | Length |
| 1 | 0.309 | 370 |
| 2 | 0.2664 | - |
| 3 | 0.1244 | 229 |
| 4 | 0.0392 | 773 |
Mainly what I would like to do to make a grid that has for each ID, the predominant X (X that has the biggest length) and if there are any "True" values in the Y column report the summation length of those True records otherwise report a blank.
Solved! Go to Solution.
@Anonymous
You can use these MEASURES
Predominant X =
CALCULATE (
MAX ( Table1[X] ),
FILTER ( table1, Table1[Length] = MAX ( Table1[Length] ) )
)
Length_ = CALCULATE(sum(Table1[Length]),Table1[Y]=true)
@Anonymous
You can use these MEASURES
Predominant X =
CALCULATE (
MAX ( Table1[X] ),
FILTER ( table1, Table1[Length] = MAX ( Table1[Length] ) )
)
Length_ = CALCULATE(sum(Table1[Length]),Table1[Y]=true)
Thanks Zubair for your help, it is really appreciated 🙂
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 29 | |
| 27 | |
| 25 | |
| 20 | |
| 14 |
| User | Count |
|---|---|
| 53 | |
| 47 | |
| 22 | |
| 19 | |
| 18 |