Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
| TABLE NAME | ||
| srl no | srl ref. | desc |
| 1 | 1 | a |
| 2 | 1 | b |
| 3 | 1 | c |
| 4 | 4 | a |
| 5 | 4 | b |
| 6 | 4 | c |
Filter value from srlno search in srl ref.(if srl = srl ref. and desc = "b" then srl no in new col1),( if srl = srl ref. and desc = "c" then srl no in new col2)
| TABLE NAME | ||||
| srl no | srl ref. | desc | new col1 | new col2 |
| 1 | 1 | a | 2 | 3 |
| 4 | 4 | a | 5 | 6 |
Solved! Go to Solution.
Hi @sohailstsindia ,
Please try this:
b =
CALCULATE (
MAX ( 'Table'[srl no] ),
FILTER ( ALLEXCEPT ( 'Table', 'Table'[srl ref.] ), 'Table'[desc] = "b" )
)
c =
CALCULATE (
MAX ( 'Table'[srl no] ),
FILTER ( ALLEXCEPT ( 'Table', 'Table'[srl ref.] ), 'Table'[desc] = "c" )
)
Hi @sohailstsindia ,
Please try this:
b =
CALCULATE (
MAX ( 'Table'[srl no] ),
FILTER ( ALLEXCEPT ( 'Table', 'Table'[srl ref.] ), 'Table'[desc] = "b" )
)
c =
CALCULATE (
MAX ( 'Table'[srl no] ),
FILTER ( ALLEXCEPT ( 'Table', 'Table'[srl ref.] ), 'Table'[desc] = "c" )
)
@sohailstsindia , Create relationship srl no and use RELATED function with IF .
https://www.sqlbi.com/daxpuzzle/related-in-a-query/
Regards,
Manikumar
Proud to be a Super User!
thanks @Manikumar can you please write DAX.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 85 | |
| 69 | |
| 37 | |
| 29 | |
| 27 |