Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
I am given a datatable table1 with a column named postal_code. I created a matrix with rows being given by distinct values in postal_code. However, I would like to exclude some of these rows in the matrix, specifically those values in postal_code that do not appear in a column postal_code2 of a different table, say table2.
Is this possible?
Solved! Go to Solution.
Hi @bipolarminds ,
Please try new a measure like:
Measure =
VAR _table = INTERSECT(DISTINCT('Table1'[postal_code1]),DISTINCT('Table2'[postal_code2]))
VAR _filter = IF(SELECTEDVALUE('Table1'[postal_code1]) IN _table,1)
RETURN
_filter
and apply it to the matrix's filter:
attach the pbix file for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
you can filter the postal_code column with a slicer or in the filter pane, or?
Thx for your answer! I'd rather not exclude the values manually since the data is getting updated on a regular basis. Isn't there a way to say 'only show those values which can be found in table2[postal_code2]'?
Hi @bipolarminds ,
Please try new a measure like:
Measure =
VAR _table = INTERSECT(DISTINCT('Table1'[postal_code1]),DISTINCT('Table2'[postal_code2]))
VAR _filter = IF(SELECTEDVALUE('Table1'[postal_code1]) IN _table,1)
RETURN
_filter
and apply it to the matrix's filter:
attach the pbix file for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.