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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi!
I need to find how many times unique ID occures in table B and C and count how many times this Unique ID appears in table A.
In a card visual I need to display this value. So far I was trying below measure, and couple of different once, but nothhing works. It filters it correctly, but it does not show me the proper value in the Card visual.
Solved! Go to Solution.
@Anonymous
In a card visual, there is no row context to filter the tables, so SELECTEDVALUE or similar row-based filtering won't work properly.
Correct Measure:
Measure =
VAR TableBIDs = DISTINCT('Table B'[Unique_ID])
VAR TableCIDs = DISTINCT('Table C'[Unique_ID])
VAR CombinedIDs = UNION(TableBIDs, TableCIDs)
VAR IDsInA = FILTER(CombinedIDs, NOT(ISBLANK(LOOKUPVALUE('Table A'[Unique_ID], 'Table A'[Unique_ID], [Unique_ID]))))
RETURN
COUNTROWS(IDsInA)
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
@Anonymous
In a card visual, there is no row context to filter the tables, so SELECTEDVALUE or similar row-based filtering won't work properly.
Correct Measure:
Measure =
VAR TableBIDs = DISTINCT('Table B'[Unique_ID])
VAR TableCIDs = DISTINCT('Table C'[Unique_ID])
VAR CombinedIDs = UNION(TableBIDs, TableCIDs)
VAR IDsInA = FILTER(CombinedIDs, NOT(ISBLANK(LOOKUPVALUE('Table A'[Unique_ID], 'Table A'[Unique_ID], [Unique_ID]))))
RETURN
COUNTROWS(IDsInA)
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Hi Kedar,
Thank you, that works ! The only thing which I changed is below, as I wanted to only count distinct values from both columns B and C.
VAR CombinedIDs = DISTINCT(UNION(TableBIDs, TableCIDs))
Thank you!