Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi
I'm trying to see if it is possible in M (Power Query) to create a group (or association) so that when a specific ID is selected (where multiple choice is not possible) in a filter, that all rows (or just rows from a specific column) could be displayed based on a matching column value they share.
To explain this would be that is ID 245 was selected, it shares exact matching column "ProductType" with row ID 112. So the value to show in would be Result A in a card type visual, or as Result B as a table showing all rows. But in either type, it would be displaying the Value in all associated rows that belong to the matching ProductType.
I have tried a few different methods of doing this, but I always seem to get only a single value, matching the row containing the ID selected, and not getting both rows regardless of which ever ID is selected.
Has anyone had to do something similar and able to help?
Thanks
Solved! Go to Solution.
Hi @jius ,
Please try below steps:
1. below is my test table
Table:
Table2:
create with below dax formula:
Table 2 = VALUES('Table'[ID])
2. create a measure with below dax formula
Measure =
VAR cur_id =
SELECTEDVALUE ( 'Table 2'[ID] )
VAR tmp =
CALCULATETABLE (
VALUES ( 'Table'[ProductType] ),
'Table'[ID] = cur_id,
ALL ( 'Table' )
)
RETURN
IF ( SELECTEDVALUE ( 'Table'[ProductType] ) IN tmp, 1 )
3. add a slicer with "Table2", add a table visual with "Table", add above measure into the table visual filter
Please refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jius ,
Please try below steps:
1. below is my test table
Table:
Table2:
create with below dax formula:
Table 2 = VALUES('Table'[ID])
2. create a measure with below dax formula
Measure =
VAR cur_id =
SELECTEDVALUE ( 'Table 2'[ID] )
VAR tmp =
CALCULATETABLE (
VALUES ( 'Table'[ProductType] ),
'Table'[ID] = cur_id,
ALL ( 'Table' )
)
RETURN
IF ( SELECTEDVALUE ( 'Table'[ProductType] ) IN tmp, 1 )
3. add a slicer with "Table2", add a table visual with "Table", add above measure into the table visual filter
Please refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
102 | |
71 | |
64 | |
39 |