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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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.
Vote for your favorite vizzies from the Power BI World Championship submissions!
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 |
|---|---|
| 56 | |
| 53 | |
| 40 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 116 | |
| 107 | |
| 42 | |
| 34 | |
| 25 |