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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

suparnababu8

How to show slicer selected values in Power BI Reports

Let’s dive into the implementation!

 

1730802434041.png

If you observe the above Power BI report, multiple filter conditions have been applied. Users are unable to see which filters are active.

Let’s go step-by-step to display the selected/filtered slicer values.

 

STEP 1 - Create a DAX Measure
Create a DAX measure as shown in below code box

 

// Define the variable for Fiscal Year and concatenate selected values or "All" if no selection
VAR FYear = "Fiscal Year : " & IF(
    ISFILTERED('Date'[Fiscal Year]), // Check if Fiscal Year is filtered
    CONCATENATEX(
        VALUES('Date'[Fiscal Year]), // Get the selected values for Fiscal Year
        'Date'[Fiscal Year], // Concatenate the selected values
        " , " // Separator for multiple values
    ),
    "All" // Default value if no selection
) & " | " // Separator for the next part


VAR Region = "Region : " & IF(
    ISFILTERED('Sales Territory'[Region]), 
    CONCATENATEX(
        VALUES('Sales Territory'[Region]), 
        'Sales Territory'[Region], 
        " , " 
    ),
    "All" 
) & " | " 


VAR BSType = "Business Type : " & IF(
    ISFILTERED(Reseller[Business Type]), 
    CONCATENATEX(
        VALUES(Reseller[Business Type]), Type
        Reseller[Business Type],
        " , " 
    ),
    "All" 
) & " | " 


VAR Channel = "Channel : " & IF(
    ISFILTERED('Sales Order'[Channel]), 
    CONCATENATEX(
        VALUES('Sales Order'[Channel]), 
        'Sales Order'[Channel], 
        " , " 
    ),
    "All" 
)

// Return the concatenated string of all variables
RETURN
    FYear & "  " & Region & "  " & BSType & "  " & Channel

 

STEP 2: Insert the new Text Box

Insert a new text box by clicking the text box option as shown in below image. Then new text box will be inserted into PBI canvas.

1730804769074.png

 

Now you can click on + Value. The moment you'll click on + Value, you'll be able see below image

 

Step 4 : Simply type the name of the created measure and select it in the “Ask a question about your data” feature, as shown in Image.1730809626233.png

 

Then click save button. Now you'll see filtered values in text box as shown in below image

 

1730809732679.png

 

Now, let’s apply formatting options to display the slicer selected values properly. Finally, the slicer selected values will be shown in the report as illustrated in Image

 

1730810111188.png

If you found this article helpful, please like, share, and save it.

 

Thank you!

 

Best Regards

Suparna Babu

Comments

Great

Nicely explained about the Slicer Selection in Power Bi report.

Hi, Thank you for the explanation. I tried it in my Power BI report, and it is working fine. However, the user has requested a solution because they are unable to Recognize the selected slicer values due to the same text color format. They have suggested whether it is possible to display each slicer in a different text color or arrange each slicer in a separate row format. Could you please check this request and help me with a possible solution?

This is great

@suparnababu8  Hi, Thank you for the explanation. I tried it in my Power BI report, and it is working fine. However, the user has requested a solution because they are unable to Recognize the selected slicer values due to the same text color format. They have suggested whether it is possible to display each slicer in a different text color or arrange each slicer in a separate row format. Could you please check this request and help me with a possible solution?

Hi @asudhakar707 I'm glad you liked it. Each color for slicer I think not possible. if you want to arrange it in a row format. You can split the measure into different measures as per your slicers(for example if you have 5 slicers you need to create  5 measures) the you can take different ext boxes and add those mesures in row format. This is my proposal. Think about it and try to implemnet. Let me know if it works. Thank yoU!