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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Power BI - Don't show slicer with mandatory fields in dropdown menu.

Hi, everyone,

I have the following data selection:


1. SALES
2. DEMAND
3: FC1
4: FC2
5: FC3
...
n: FCn

 

The data "SALES" and "DEMAND" should be mandatory fields.
This means I only want to have the historical data "FC..." as a selection later in the slicer.

So i want to see this in my dropdown slicer:

1: FC1
2: FC2
3: FC3
...
n: FCn


However, I need the data "SALES" and "DEMAND" for the report.
But i can't just hide this data with the slicer.
I hope you understood me 🙂
Many Thanks
Flixy

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

Its bit tricky part so have to handle it differently. Try to follow below steps:-

1. Create a seperate table for snapshots with below code:-

 

Snapshot_table = DISTINCT(FC_Data[Snapshot])

 

 

2. Now use newly created table in slicer.

Samarth_18_0-1643052821390.png

 

3. Now create a measure with below code:-

 

Measure =
IF (
    MAX ( FC_Data[Snapshot] )
        IN VALUES ( 'Snapshot_table'[Snapshot] )
            || MAX ( FC_Data[Snapshot] ) IN { "DEMAND", "SALES" },
    1,
    0
)

 

 

4. User new measure as filter on your bar chart:-

Samarth_18_1-1643052906917.png

 

output:-

Samarth_18_2-1643052943180.png

Note: Make sure you are not creating any relationship with existing table with new table.

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hi  @Anonymous ,

 

@Samarth_18 's solution is effective. Could you share some screenshots to help us clarify your scenario since you mentioned it is not work on your side?

 

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,
Eyelyn Qin

Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

Its bit tricky part so have to handle it differently. Try to follow below steps:-

1. Create a seperate table for snapshots with below code:-

 

Snapshot_table = DISTINCT(FC_Data[Snapshot])

 

 

2. Now use newly created table in slicer.

Samarth_18_0-1643052821390.png

 

3. Now create a measure with below code:-

 

Measure =
IF (
    MAX ( FC_Data[Snapshot] )
        IN VALUES ( 'Snapshot_table'[Snapshot] )
            || MAX ( FC_Data[Snapshot] ) IN { "DEMAND", "SALES" },
    1,
    0
)

 

 

4. User new measure as filter on your bar chart:-

Samarth_18_1-1643052906917.png

 

output:-

Samarth_18_2-1643052943180.png

Note: Make sure you are not creating any relationship with existing table with new table.

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

Hi @Samarth_18 
thats not working in my Dashboard.
But thank you for the idea.

Anonymous
Not applicable

I want that the end user only can choose one "FC"-Snapshot.
The "Sales" and "Demand" should be automatically chosen.

So this is my database:

Flixyyyy_0-1643045209445.png

So i get this view:

Flixyyyy_1-1643045309737.png

But i only want to see one "FC".

If i filter now in the slicer without "Demand" and without "Sales" i get this:

Flixyyyy_2-1643045448829.png

Did you get my question? 😄

amitchandak
Super User
Super User

@Anonymous , is it a measure slicer?  Not very clear what you want.

 

With calculation group, you can get that multiselect and save with Demand and sales 

calculation groups
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

This is what i get after the steps: @Anonymous @Samarth_18 

Flixyyyy_0-1643891390801.png

 

@Anonymous I am hoping there is no relationship between these two tables?

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

@Samarth_18 i have created a relationship 😥
Now after delete the relationship its working 🙂

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors