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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.