cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

select value from one column filter with another column

TABLE NAME  
srl no            srl ref.          desc             
11a
21b
31c
44a
54b
64c

 

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                                         
11a23
44a56
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: select value from one column filter with another column

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" )
)

 

v-xuding-msft_0-1601436079359.png

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Solution Supplier
Solution Supplier

Re: select value from one column filter with another column

@sohailstsindia , Create relationship srl no and use RELATED function with IF .

 

https://www.sqlbi.com/daxpuzzle/related-in-a-query/

 

Regards, 

Manikumar

Highlighted
Helper I
Helper I

Re: select value from one column filter with another column

thanks @Manikumar can you please write DAX.

Highlighted
Community Support
Community Support

Re: select value from one column filter with another column

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" )
)

 

v-xuding-msft_0-1601436079359.png

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper I
Helper I

Re: select value from one column filter with another column

Thank @v-xuding-msft 

Helpful resources

Announcements
Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors