Forum Discussion
Line & Stacked Column Chart
- 1 year ago
What would you like to do with A to E?
If you are asking can you group measures then yes.
The easiest thing to do is use a Field Parameter:
https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parametersThen after you have created this swap to Table view, then Right click the first column in the table and choose New Group.
Assign each measure to the X or Y group.
Using this in the visual will pull all the group measures through and you can filter the group to either X or Y.
- Anonymous1 year ago
Hi Anonymous
Thanks for the reply from SamWiseOwl, please allow me to add my opinion.
Do you want measure A-E to be displayed all the time, and then when "X" is selected in the slicer, show measure F, and when any other option is selected, show measure G? If so, please refer to the following test:
I am using the sample data from Power BI Desktop.
There is another table as a slicer, and there is no relationship between the two tables. Then I created five measures.
Then I created the following measure:
Output = IF(SELECTEDVALUE('Slicer'[Slicer]) = "X", [Measure 5], [Measure 4])When I select "X", the visualization shows [Measure5], and when I select the other options, it shows [Measure4].
Output:
The following is the specific approach of SamWiseOwlâs method I understand, for your reference:
Select Field Parameter
In the Table view interface, right-click Parameter and select New group.
Select the corresponding measure to create a group. Here I group [Measure4] and [Measure5] separately, and then add other measures to the "Other" group. The reason is that measures that have been added to a group cannot be reused. In other words, if other measures are grouped with any measure, they cannot be displayed together with another measure.
Output:
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
Thanks for the reply from SamWiseOwl, please allow me to add my opinion.
Do you want measure A-E to be displayed all the time, and then when "X" is selected in the slicer, show measure F, and when any other option is selected, show measure G? If so, please refer to the following test:
I am using the sample data from Power BI Desktop.
There is another table as a slicer, and there is no relationship between the two tables. Then I created five measures.
Then I created the following measure:
Output = IF(SELECTEDVALUE('Slicer'[Slicer]) = "X", [Measure 5], [Measure 4])
When I select "X", the visualization shows [Measure5], and when I select the other options, it shows [Measure4].
Output:
The following is the specific approach of SamWiseOwlâs method I understand, for your reference:
Select Field Parameter
In the Table view interface, right-click Parameter and select New group.
Select the corresponding measure to create a group. Here I group [Measure4] and [Measure5] separately, and then add other measures to the "Other" group. The reason is that measures that have been added to a group cannot be reused. In other words, if other measures are grouped with any measure, they cannot be displayed together with another measure.
Output:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.