Forum Discussion
how to get flag value
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 |
Hi Anonymous ,
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.
Anonymous
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- Anonymous1 year ago
Thanks for the reply from Rupak_bi and Kedar_Pande, please allow me to provide another insight.
Hi Anonymous ,
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.
3 Replies
- Rupak_biSuper User
Hi Anonymous ,
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.
- Kedar_PandeSuper User
Anonymous
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 - AnonymousNot applicable
Thanks for the reply from Rupak_bi and Kedar_Pande, please allow me to provide another insight.
Hi Anonymous ,
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.