Forum Discussion

Suman2505855's avatar
Suman2505855
Regular Visitor
5 months ago
Solved

Slicer issue.

Hi Team, I need your support regarding a slicer issue in my Power BI report. I have created a Department slicer using data from the HR data table and a Month slicer using data from the Calendar dat...
  • V-yubandi-msft's avatar
    V-yubandi-msft
    4 months ago

    Hi Suman2505855 ,

    You can achieve this by creating a simple measure and using it as a filter on the Department slicer.

    Dept Visible =
    IF(
        CALCULATE(COUNTROWS('HR Table')) > 0,
        1,
        0
    )
    

    After creating this measure, select the Department slicer and add this measure to the Filters pane. Set the filter to is 1.

    This will ensure the slicer shows only departments that have data for the selected month.

    FYI:

     

    For more details, I’ve attached the PBIX file. Please take a look and let me know if anything needs to be adjusted or if you need any additional information.