Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a Category Table for Measure which lists all measure names that I am going to use in the dashboard.
I have a matrix visual that shows the the measure category, year-month and corresponding values for each year-month for each measure.
I wanted to know if I will be able to create a visual - let's say a line or combo visual to show the selected measures(more than 1 measure). Let's say I select Wrvus and Wrvus/Visit in measures filter below, then the primary axis can be wrvus and secondary axis can be wrvus per visit. Max of 2 measures will only be selected.
I was able to do it on small multiples but it is splitting each measure as seperate graph as above.
How to do it without small multiples to achieve as primary and secondary axis like a normal graph??
The measure I used for the visualization and tabel -
Thanks so much in advance for your help!!
Solved! Go to Solution.
Yes, if you use line chart , you can use as many measure as you want using field value parameter option. See above example with 4 measure:
With any 2 selection:
But if you want to use line and column as combo like (Primary and secondary) then you need to adjust the provided measure. How? Use nested if statement or switch function for multiple choice. Let's say i want measure A, B, C to show as a column by selection, then create one measure A with else if statement. Same way other one.
Hope this solved your problem!!
If, please accept it as a solution!!
Best Regards,
Shahariar Hafiz
Hi @Kalaivani
In a situation where the metrics have similar proportions and can be compared, you can use a column in the measure table you created as a legend and display the graph with multiple measures based on the selection.
However, in the case of the metrics shown in the image, this is not feasible because the differences between them are too large to be displayed on the same scale.
Which means that two axes are needed.
To use two axes, you need two separate measures, each holding the selection from the slicer.
To make this dynamic and work even when there are more than two measures, you can use DAX. For example:
first selection =
var
min_selection =
min(measures_[Measure])
return
if (min_selection= "Wrvus",[Wrvus_],
if(min_selection= "Wrvus/Visit",[Wrvus/visit_],blank()))
Last selection =
var
max_selection =
MAX(measures_[Measure])
return
if (max_selection= "Wrvus",[Wrvus_],
if(max_selection= "Wrvus/Visit",[Wrvus/visit_],blank()))
This allows working with an unlimited number of measures, but the display will always be limited to two measures at a time, and the formula must explicitly list all possible options.
Additionally, for the legend to be meaningful, it cannot simply be "First Selection / Second Selection."
To overcome this, you can create measures that hold only the selected values and use them in text boxes to display the correct labels, while hiding the default legend.
The legend's font color can be changed to white to make it invisible.
fs = min('measures_'[Measure])
Ls = MAX('measures_'[Measure])
Although we managed to solve the technical challenge of displaying two different measures on a dual-axis chart, from an effective data visualization perspective, this approach is not recommended.
Combining different metrics in the same graph is misleading because the human brain naturally groups elements into a single unit (Gestalt principles).
When users first see the graph, their instinctive reaction is to compare the height of the lines—which is inherently incorrect, as these represent two entirely different metrics.
Even once they realize the mistake, they must still mentally filter out the distraction of the second line to focus on the first. This increases cognitive load, making the comparison harder than it should be.
A far better alternative is to use small multiples:
- They eliminate misleading height comparisons by clearly separating the measures.
- Each metric retains its own scale, ensuring correct interpretation.
- Because the graphs are aligned, users can still easily compare trends.
The goal of data visualization is not just to display information but to make interpretation effortless. A well-designed small multiples layout achieves this by reducing unnecessary cognitive effort while preserving clear, accurate insights.
From here, it's up to you how to proceed. In any case, I'm attaching a PBIX file with all the examples.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @Kalaivani
In a situation where the metrics have similar proportions and can be compared, you can use a column in the measure table you created as a legend and display the graph with multiple measures based on the selection.
However, in the case of the metrics shown in the image, this is not feasible because the differences between them are too large to be displayed on the same scale.
Which means that two axes are needed.
To use two axes, you need two separate measures, each holding the selection from the slicer.
To make this dynamic and work even when there are more than two measures, you can use DAX. For example:
first selection =
var
min_selection =
min(measures_[Measure])
return
if (min_selection= "Wrvus",[Wrvus_],
if(min_selection= "Wrvus/Visit",[Wrvus/visit_],blank()))
Last selection =
var
max_selection =
MAX(measures_[Measure])
return
if (max_selection= "Wrvus",[Wrvus_],
if(max_selection= "Wrvus/Visit",[Wrvus/visit_],blank()))
This allows working with an unlimited number of measures, but the display will always be limited to two measures at a time, and the formula must explicitly list all possible options.
Additionally, for the legend to be meaningful, it cannot simply be "First Selection / Second Selection."
To overcome this, you can create measures that hold only the selected values and use them in text boxes to display the correct labels, while hiding the default legend.
The legend's font color can be changed to white to make it invisible.
fs = min('measures_'[Measure])
Ls = MAX('measures_'[Measure])
Although we managed to solve the technical challenge of displaying two different measures on a dual-axis chart, from an effective data visualization perspective, this approach is not recommended.
Combining different metrics in the same graph is misleading because the human brain naturally groups elements into a single unit (Gestalt principles).
When users first see the graph, their instinctive reaction is to compare the height of the lines—which is inherently incorrect, as these represent two entirely different metrics.
Even once they realize the mistake, they must still mentally filter out the distraction of the second line to focus on the first. This increases cognitive load, making the comparison harder than it should be.
A far better alternative is to use small multiples:
- They eliminate misleading height comparisons by clearly separating the measures.
- Each metric retains its own scale, ensuring correct interpretation.
- Because the graphs are aligned, users can still easily compare trends.
The goal of data visualization is not just to display information but to make interpretation effortless. A well-designed small multiples layout achieves this by reducing unnecessary cognitive effort while preserving clear, accurate insights.
From here, it's up to you how to proceed. In any case, I'm attaching a PBIX file with all the examples.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @Ritaf1983 Thanks so so so much for taking your time to explain the user perspective. I will work on both options provided and decide which is more accurate and reasonable from user perspective.
Thanks again for your reply!!!!
Happy to help💌
Hi @Kalaivani What I can understand that you want to create a slicer with multiple measure names and want to create a combo chart to show 2 different measures to 2 different axis like one measure in Y axis/Column and other one in Secondy Axis by slicer selection.
In general case, line chart ok enough to show different measure by field value selection. See example:
However, to achieve this, create 2 different measure for 2 axis (Primary and Secondary). Your code would not work for this scenario because all the time it will be same. Try the below codes :
For Measure A:
A =
IF(
CONTAINSSTRING ( CONCATENATEX ( 'Select Measure', 'Select Measure'[Select Measure], "," ), "Total Plays" ), [TotalPlays]
)
For Measure B:
B =
IF(
CONTAINSSTRING ( CONCATENATEX ( 'Select Measure', 'Select Measure'[Select Measure], "," ), "Total Minutes" ), [TotalMinutes]
)
Here 'Select measure' is the field value.
I have used Line and stack column chart for this case. See images:
1. When nothing selected (You can modify measure to show different things if no selection made)
2. With single selection:
3. With multiple selection :
Hope this helps!!
If the solved your problem, please accept it as a solution!!
Best Regards,
Shahariar Hafiz
Hi @shafiz_p Thanks very much for your response. But I will be using more measures going forward. So let's say the slicer has 10 measure names. Whatever 2 measures the user selects, should show as 2 lines in the graph. Will that be possible? Thanks again!!
Yes, if you use line chart , you can use as many measure as you want using field value parameter option. See above example with 4 measure:
With any 2 selection:
But if you want to use line and column as combo like (Primary and secondary) then you need to adjust the provided measure. How? Use nested if statement or switch function for multiple choice. Let's say i want measure A, B, C to show as a column by selection, then create one measure A with else if statement. Same way other one.
Hope this solved your problem!!
If, please accept it as a solution!!
Best Regards,
Shahariar Hafiz
Happy to help!!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |