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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
DavidMG82
Helper I
Helper I

Slicer Selected Values Label to text

Hi everyone, im trying to replicate the summary of selections on my dropdown slicer, which currently holds three fields: FY, FQ and M.

So depending on the values I am selecting the slicer shows a summary like the following:

 

Option 1: 2023 (FY) + Q2 (FQ) + 01 (M)

Option 2: 2023 (FY) + Q2 (FQ)

Option 3: 2023 (FY)

 

How can I replicate this with a measure to present as text with a Scorecard?, thanks ahead for your help!

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

use ISFILTERED, HASONEFILTER, FILTERS and VALUES to figure out if the columns are filtered. Then concatenate the results accordingly.

 

Note that there is a difference between "nothing filtered yet"  and "nothing filtered as result of the filters being cleared". You could call that a bug, or a feature.

View solution in original post

Many thanks, I was using the method below but I was sure there is probably a better way to do it. I will follow your recommendations.

 

dateLabel = 
Var year_ = SELECTEDVALUE(cm[ReportFY],BLANK())
Var quarter_ = SELECTEDVALUE(cm[ReportQ],BLANK())
Var month_ = SELECTEDVALUE(cm[monthLabelShort],BLANK())

return
 SWITCH(
    TRUE(),
        quarter_="","Selected Date: " & CONCATENATE(year_," (FY) "),
        month_="","Selected Date: " & CONCATENATE(CONCATENATE(year_," (FY) + "),CONCATENATE(quarter_," (FQ)")),
        "Selected Date: " & CONCATENATE(CONCATENATE(CONCATENATE(year_," (FY) + "),CONCATENATE(quarter_," (FQ) + ")),CONCATENATE(month_," (M)")
    ))

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

use ISFILTERED, HASONEFILTER, FILTERS and VALUES to figure out if the columns are filtered. Then concatenate the results accordingly.

 

Note that there is a difference between "nothing filtered yet"  and "nothing filtered as result of the filters being cleared". You could call that a bug, or a feature.

Many thanks, I was using the method below but I was sure there is probably a better way to do it. I will follow your recommendations.

 

dateLabel = 
Var year_ = SELECTEDVALUE(cm[ReportFY],BLANK())
Var quarter_ = SELECTEDVALUE(cm[ReportQ],BLANK())
Var month_ = SELECTEDVALUE(cm[monthLabelShort],BLANK())

return
 SWITCH(
    TRUE(),
        quarter_="","Selected Date: " & CONCATENATE(year_," (FY) "),
        month_="","Selected Date: " & CONCATENATE(CONCATENATE(year_," (FY) + "),CONCATENATE(quarter_," (FQ)")),
        "Selected Date: " & CONCATENATE(CONCATENATE(CONCATENATE(year_," (FY) + "),CONCATENATE(quarter_," (FQ) + ")),CONCATENATE(month_," (M)")
    ))

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.