Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have a line on a graph that represents = TOTAL
TOTAL is made of up of 2 PARTS: PART 1 and PART 2.
Currently I have a filter that has PART 1 and PART 2.
I want to have the ability to show either TOTAL by itself and then PART 1 and PART 2 on the same graph.
1. Is it possible to do this? Have 1 line and then select a filter that splits the line into 2 lines.
2. OR is it possible to have a filter that only filters one line of the two?
Solved! Go to Solution.
Create a measure that calculates Part 1 and a measure that calculates Part 2. Next we will create a new table which will act as your menu and 2 more measure that will change depending on your selection.
Your new table should have 2 columns "Display Text" (String) and "ID" (Whole Number). Put your two filter options in this table and use the ID's 1 and 2. This table does not require any table relationships. This table should be put into your Slicer.
Now we are going to create the 2 measures, which will be the measures on your graph. They will be something like:
Part1Graph = if ( MIN('SelectionTable'[ID]) = 1), [Part1] + [Part2], [Part1] ) ) Part2Graph = if ( MIN('SelectionTable'[ID]) = 1), [Part1] + [Part2], [Part2] ) )
Above we are assuming that Filter ID 1 will show both together. If nothing is selected, filter ID 1 is used by default (hence the MIN)
Now, when the dropdown has the first option selected, both Lines will return the same value and be drawn over the top of each other. When you select the other option, these lines will now only display Part1 and Part2 respectively.
Create a measure that calculates Part 1 and a measure that calculates Part 2. Next we will create a new table which will act as your menu and 2 more measure that will change depending on your selection.
Your new table should have 2 columns "Display Text" (String) and "ID" (Whole Number). Put your two filter options in this table and use the ID's 1 and 2. This table does not require any table relationships. This table should be put into your Slicer.
Now we are going to create the 2 measures, which will be the measures on your graph. They will be something like:
Part1Graph = if ( MIN('SelectionTable'[ID]) = 1), [Part1] + [Part2], [Part1] ) ) Part2Graph = if ( MIN('SelectionTable'[ID]) = 1), [Part1] + [Part2], [Part2] ) )
Above we are assuming that Filter ID 1 will show both together. If nothing is selected, filter ID 1 is used by default (hence the MIN)
Now, when the dropdown has the first option selected, both Lines will return the same value and be drawn over the top of each other. When you select the other option, these lines will now only display Part1 and Part2 respectively.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |