Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi, experts, I have two tables, dimension table and fact table, I created a filter use column from dimension table, but fact table may not exist some values in dimension table, and I need to make sure all the values from the fiters selected has relevant data, do you have any ideas?
My idea is that creat a measure in the dimension table, when the value from fact table exist in dimension table, then return 1, else 0, and apply this measure to the filter, but the measure crteated is not work.
here is the sample data and expected result:
dimsention table
| region |
A |
| B |
| C |
fact table
| region | data |
| A | adaf |
| C | fadfa |
expected result:
| region | measure |
| A | 1 |
| B | 0 |
| C | 1 |
I created mesure like this:
measure=
VAR _fact=MAX('fact'[region])
Solved! Go to Solution.
Hi @Anonymous
You may try this measure
Measure =
var __values = VALUES('Fact'[region])
return
IF(SELECTEDVALUE('Dimension'[region]) IN __values, 1, 0)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!
Hi @Anonymous
You may try this measure
Measure =
var __values = VALUES('Fact'[region])
return
IF(SELECTEDVALUE('Dimension'[region]) IN __values, 1, 0)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!
Try Countx
Relevant Data Measure = VAR _fact_region = 'fact'[region] VAR _dim_region = 'dim'[region] RETURN IF( COUNTX( 'dim', _fact_region = _dim_region ) > 0, 1, 0 )
It will count the number of rows in each.
This measure has error: the function countx cannot work with values of type boolean
Try changing the data types ? or use "1" and "0" instead of 1 and 0
Thanks, I tried and it still has the same error
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 75 | |
| 36 | |
| 31 | |
| 29 | |
| 26 |