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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
PBI_newuser
Post Prodigy
Post Prodigy

How to create a slicer for a combination of selection

Hi, I want to create a slicer as below so that I can view the total labor hours by selecting the slicer.

For example, when I select "Multiple Repairs - Yes", the total labor hours = 11.5 hours.

When I select "Failed to Install", the total labor hours = 9.9 hours.

When I select "ELF - Yes", the total labor hours = 9.6 hours.

When I select "Task Code-FCN", the total labor hours = 10.6 hours.

How to create a column/measure for that?

 

Slicer: 

  • Multiple Repairs - Yes
  • Failed to Install
  • ELF - Yes
  • Task Code - FCN

 

Job#Multiple RepairsCase ReasonELFTask CodeLabor Hours
Job-123YesServiceYesFCN2
Job-234NoFailed to InstallYesRepair3.5
Job-345NoIssueNoInstall1
Job-456NoFailed to InstallNoFCN6.4
Job-567YesServiceNoRepair3.2
Job-678YesPMYesRepair4.1
Job-789YesImplentationNoFCN2.2
1 ACCEPTED SOLUTION
Jos_Woolley
Solution Sage
Solution Sage

Hi,

Try the following measure, which assumes that the data is in a table named Data Table and that your four slicer choices are in a column named Slicer in a table named Slicer Table

 

 

Total Labor Hours =
VAR S =
    SELECTEDVALUE ( 'Slicer Table'[Slicer] )
RETURN
    CALCULATE (
        SUM ( 'Data Table'[Labor Hours] ),
        CONTAINSSTRING (
            'Data Table'[Multiple Repairs],
            IF ( S = "Multiple Repairs - Yes", "Yes", "*" )
        ),
        CONTAINSSTRING ( 'Data Table'[ELF], IF ( S = "ELF - Yes", "Yes", "*" ) ),
        CONTAINSSTRING (
            'Data Table'[Case Reason],
            IF ( S = "Failed to Install", S, "*" )
        ),
        CONTAINSSTRING (
            'Data Table'[Task Code],
            IF ( S = "Task Code - FCN", "FCN", "*" )
        )
    )

 

 

Regards

View solution in original post

3 REPLIES 3
Jos_Woolley
Solution Sage
Solution Sage

Hi,

Try the following measure, which assumes that the data is in a table named Data Table and that your four slicer choices are in a column named Slicer in a table named Slicer Table

 

 

Total Labor Hours =
VAR S =
    SELECTEDVALUE ( 'Slicer Table'[Slicer] )
RETURN
    CALCULATE (
        SUM ( 'Data Table'[Labor Hours] ),
        CONTAINSSTRING (
            'Data Table'[Multiple Repairs],
            IF ( S = "Multiple Repairs - Yes", "Yes", "*" )
        ),
        CONTAINSSTRING ( 'Data Table'[ELF], IF ( S = "ELF - Yes", "Yes", "*" ) ),
        CONTAINSSTRING (
            'Data Table'[Case Reason],
            IF ( S = "Failed to Install", S, "*" )
        ),
        CONTAINSSTRING (
            'Data Table'[Task Code],
            IF ( S = "Task Code - FCN", "FCN", "*" )
        )
    )

 

 

Regards

Thank you so much @Jos_Woolley ! It works.

You're welcome!

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.