Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
DiePic
Resolver II
Resolver II

Help for DAX - find value of a column in another table

Hi all

I need to find a value in a column in another table ... something similar like next (sql format):

select TABLE01.[col01]  ..... 
where TABLE01.[col02] = TABLE02.[col11] and TABLE01.[col03] = TABLE02.[col12] 
...
there is a way to do that?
Thanx in advance for any help or suggestion
1 ACCEPTED SOLUTION

in Power bi, DAX is actullay iused used as a meaure in viz , which generates a scalar value for each axis dropped in a viz, which you were trying to utilize.

 

The first expression is a table expression which is to be used if you want dax to return a full table as opposed to a scalar value. Mainly used when you need a derived table / you want to check the derived table that you are passing within CALCULATE.

 

If you are new to DAX, this concept might take a while for you to grasp but looks like you work with SQL, so with patience you will get it.

 

DAX is neither easy nor simple, it takes a while to get used to it.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

8 REPLIES 8
smpa01
Super User
Super User

@DiePic  direct translation

EVALUATE
SELECTCOLUMNS (
    FILTER (
        TABLE01,
        ( TABLE01[col02], TABLE01[col03] )
            IN ( SUMMARIZE ( TABLE02, TABLE02[col11], TABLE02[col12] ) )
    ),
    TABLE01[col01]
)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

thanx @smpa01 
and if I need something like this?

select TABLE01.[col01]  ..... 
where TABLE01.[col02] = TABLE02.[col11] and TABLE01.[col03] = "my value"

@DiePic 

EVALUATE
SELECTCOLUMNS (
    FILTER (
        TABLE01,
        ( TABLE01[col02] )
            IN ( SUMMARIZE ( TABLE02, TABLE02[col11] ) ) && TABLE01[col03] = "my value"
    ),
    TABLE01[col01]
)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Hi @smpa01 
excuse me but I'm new in power bi .... where I'm mistaken

DiePic_0-1676046030027.png

 

@DiePic  you are using a table expresion in a meaure which is why it is failing. try this instead

Measure =
CALCULATE (
    MAX ( TABLE01[col01] ),
    FILTER (
        TABLE01,
        ( TABLE01[col02] )
            IN ( SUMMARIZE ( TABLE02, TABLE02[col11] ) )
                && TABLE01[col03] = "my value"
    )
)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

thanks a lot @smpa01 
this work well ... can you explain me where I'must use the first formula?
And please, why the use of MAX in last formula?
(excuse me but I'm really new of this word)
thnx for your patience and courtesy

 

 

in Power bi, DAX is actullay iused used as a meaure in viz , which generates a scalar value for each axis dropped in a viz, which you were trying to utilize.

 

The first expression is a table expression which is to be used if you want dax to return a full table as opposed to a scalar value. Mainly used when you need a derived table / you want to check the derived table that you are passing within CALCULATE.

 

If you are new to DAX, this concept might take a while for you to grasp but looks like you work with SQL, so with patience you will get it.

 

DAX is neither easy nor simple, it takes a while to get used to it.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

@smpa01 

thank you very much

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.