Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Wolfgang7
Regular Visitor

Select value from a table based on combination of selected values from other table.

Hi all,

 

I would appreciate your help with the following:

 

I have a table which holds comments explaining the differnce between two excercises for a set of concepts (table COMMENT):

 

Wolfgang7_0-1682552074844.png

I also have a table which holds the exercises, including an order for displaying it in slicers (table EXERCISE):

Wolfgang7_1-1682552215082.png

The two tables can have a relationship if needed, I'm guessing there would need to be two relationships between exercise  and excercise a and b.

I have a slicer with the EXCERCISE table where I can select one or more than one excercise for comparison purposes in a waterfall chart.

I need a card to display the correct comment when two excercises are selected, so if I select "spring" and "summer" the output for "item 1" should be "More sales".

I can't use two different fields to select excericses (which would be a lot easier for this comment problem), like a table EXERCISE A and EXCERCISE B because of how all the other visuals are set up; it has to be based off the same EXCERCISE table.

 

Please let me know if you can think of a way to achieve this.

 

Thanks a lot for any help.

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, select the last 2 columns of the first table, right click and select "Unpivot Other Columns".  Create a relationship (Many to One and Single) from the Attribute column of Table1 to the exercise column of Table2.  Now build your visual/slicers.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.