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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
newgirl
Post Patron
Post Patron

Show detail labels even if more than one field parameter value is selected

Hi!

 

I have this sample data table. The numbers under Steps 1 to 3 show the number of minutes of that step.

DateStep 1Step 2Step 3
1/1/20241520
2/1/2024789
3/15/2024101112

 

I created a SUM measure for each Step and then created a field parameter using those 3 steps.

My goal is to show in a line chart the no. of minutes based on the selected Step from the field parameter.

 

So it works fine and I decided to add detail label that shows the % variance from previous month using the measures below:

 

SELECTED = 
VAR __SelectedValue =
    SELECTCOLUMNS (
        SUMMARIZE ( Parameter, Parameter[Parameter], Parameter[Parameter Fields] ),
        Parameter[Parameter]
    )
RETURN IF ( COUNTROWS ( __SelectedValue ) = 1, __SelectedValue )
Previous Month Value = 
VAR SelectedMeasure = [SELECTED]
RETURN
    SWITCH(
        TRUE(),
        SelectedMeasure = "Step 1m", CALCULATE([Step 1m], PREVIOUSMONTH('Calendar'[Date])),
        SelectedMeasure = "Step 2m", CALCULATE([Step 2m], PREVIOUSMONTH('Calendar'[Date])),
        SelectedMeasure = "Step 3m", CALCULATE([Step 3m], PREVIOUSMONTH('Calendar'[Date])),
        BLANK()
    )

 

 

 

MoM Difference = 
VAR SelectedMeasure = [SELECTED]
RETURN
    SWITCH(
        TRUE(),
        SelectedMeasure = "Step 1m", IF([Previous Month Value]=0,BLANK(),FORMAT(DIVIDE([Step 1m],[Previous Month Value])-1,"0.0%")),
        SelectedMeasure = "Step 2m", IF([Previous Month Value]=0,BLANK(),FORMAT(DIVIDE([Step 2m],[Previous Month Value])-1,"0.0%")),
        SelectedMeasure = "Step 3m", IF([Previous Month Value]=0,BLANK(),FORMAT(DIVIDE([Step 3m],[Previous Month Value])-1,"0.0%")),
        BLANK()
    )

 

 

Initially, I was using SELECTEDVALUE() but I kept getting an error: "There's an error that showed: Calculator error in measure "[MoM Difference]". Column [Parameter] is part of composite key, but not all columns of the composite key are included in the expression or its dependent expression."

I then found this article in which it says to use the measure below:

 

VAR __SelectedValue =
    SELECTCOLUMNS (
        SUMMARIZE ( Parameter, Parameter[Parameter], Parameter[Parameter Fields] ),
        Parameter[Parameter]
    )
RETURN IF ( COUNTROWS ( __SelectedValue ) = 1, __SelectedValue )

 

 

The problem is that now, it would only show the % variance if the reader selects only ONE from the field parameter slicer since the condition in the new measure looks only if the counted rows =1 . How to keep showing the % variance regardless of the no. of selected field parameters?

Here's my sample file

 

When 1 is selected:

field1.PNG

 

When more than 1 is selected (doesn't appear anymore).

field2.PNG

1 REPLY 1
DataInsights
Super User
Super User

@newgirl,

 

You could unpivot the Step columns in Power Query (Transform --> Unpivot Columns), resulting in the following:

 

DataInsights_0-1725463043295.png

 

This should enable you to use the new Step column in a slicer instead of a field parameter.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors