The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
80 | |
66 | |
53 | |
52 |
User | Count |
---|---|
121 | |
118 | |
77 | |
64 | |
63 |