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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello. I have a column in TableA that is a concatenate of two fields: ProductID and CountryID. In TableB, I have another column that is also a concatenate of ProductID and CountryID. I am looking for a formula that would tell me if a record in this column in TableA, has an equivalent to a record in the column in TableB. In excel I would use a Countif, 0 meaning no record, and 1 (or more) if there were more records. And then I would probably nest that with an IF function so that it could just be true or false.
How can I sort this in DAX?
Thank you!
Solved! Go to Solution.
I ended up doing this, but I feel it's a bit convulted. I couldn't get the above solutions to work.
I ended up doing this, but I feel it's a bit convulted. I couldn't get the above solutions to work.
An example based on sample data with the expected result would help understanding the requirement. Try this:
1. Place TableA[Column1] in a table visual
2. Create this measure and palce it in the visual:
Measure =
IF (
CALCULATE (
COUNT ( TableB[Column1] ),
TREATAS ( SELECTEDVALUE ( TableA[Column1] ), TableB[Column1] )
) > 0,
TRUE (),
FALSE ()
)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |