March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Team,
I have table table A and table B ... see the below result .. how i can achieve on the based on DAX measuare.
Please check and provide an update
tblA 1,2,3,4,5
tblB 3,4,9,10
result | |
tblBID | Flag |
3 | 1 |
4 | 1 |
9 | 0 |
10 | 0 |
Solved! Go to Solution.
Hi @MKM ,
Here is your solution in a calculated column. this is the simple one. please let me know if you really wanna do this in a measure.
Calculated Column:
Flag =
IF(
tblB[ID] IN DISTINCT(tblA[ID]),
1,
0
)
This creates a new column in tblB with the same result.
💌 If this helped, a Kudos 👍 or Solution mark ✔️ would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Thanks for the reply from Rupak_bi and Kedar_Pande, please allow me to provide another insight.
Hi @MKM ,
You can use the following DAX to create a table that meets your needs.
Table =
ADDCOLUMNS (
TableB,
"Flag",
IF (
ISBLANK ( LOOKUPVALUE ( TableA[tblAID], TableA[tblAID], TableB[tblBID] ) ),
0,
1
)
)
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply from Rupak_bi and Kedar_Pande, please allow me to provide another insight.
Hi @MKM ,
You can use the following DAX to create a table that meets your needs.
Table =
ADDCOLUMNS (
TableB,
"Flag",
IF (
ISBLANK ( LOOKUPVALUE ( TableA[tblAID], TableA[tblAID], TableB[tblBID] ) ),
0,
1
)
)
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Calculated Column:
Flag =
IF(
tblB[ID] IN DISTINCT(tblA[ID]),
1,
0
)
This creates a new column in tblB with the same result.
💌 If this helped, a Kudos 👍 or Solution mark ✔️ would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Hi @MKM ,
Here is your solution in a calculated column. this is the simple one. please let me know if you really wanna do this in a measure.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
25 | |
18 | |
15 | |
9 | |
8 |
User | Count |
---|---|
37 | |
32 | |
16 | |
16 | |
12 |