Forum Discussion
SelectedValue to return unit label for Matrix and multiple tables
Hi,
I have one table called Exercises with 30 exercises (100 meter dash, High Jump, ...). Each exercise has an assigned measurement "Unit" (seconds, meters). Further, each exercise is in a different Season. A Season can have different units. I have a separate Season table with additional notes about each Season.
I would like to make a Matrix table that looks like this...
Rows: Season[Season Text], Exercises[Exercise Name]
Values: [Unit] (plus other measures)
Spring Season
100 Meter dash Seconds
High Jump Meters
Summer Season
200 Meter dash Seconds
Lifting Kilograms
When I try [Unit] = selectedvalue( Exercises[Exercise Name], "Multiple Units") I get "Multiple Units" for each row, because the row filter is returning all the unique units within that season and exercise, rather than for that particular row. I am trying to combine selectedvalue and distinct() as a workaround, but am stumped. Any ideas on how to ignore the season?
Note: Exercise table is connected 'many to one' with Seasons table, with the 'Season Name' being the key field in common between the tables.
Thanks,
Mike
- Anonymous5 years ago
Hi hamachekm ,
According to your description, I create this data:
Excel:
Season:
Here are the steps you can follow:
1. Create measure.
Measure = MAX('Excel'[Season])2. Use Visual Multi-row-card to place unit and motion columns
3. Set Season = Spring when placing Season in Filter
4. Find Title – Title text in Format and click on the eraser sign
5. Enter the Title Text interface, click Based on field, and select the newly created measure
6. Get results
7. After copying this visual object three times, in each Multi-row-card, filter the season into the corresponding season, and the Title Text will change accordingly
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi hamachekm ,
According to your description, I create this data:
Excel:
Season:
Here are the steps you can follow:
1. Create measure.
Measure = MAX('Excel'[Season])2. Use Visual Multi-row-card to place unit and motion columns
3. Set Season = Spring when placing Season in Filter
4. Find Title – Title text in Format and click on the eraser sign
5. Enter the Title Text interface, click Based on field, and select the newly created measure
6. Get results
7. After copying this visual object three times, in each Multi-row-card, filter the season into the corresponding season, and the Title Text will change accordingly
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.