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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Khang
Frequent Visitor

Dynamic Slicer based on another Slicer (return filtered text column)

Hi DAXperts,

 

My model has a 12 months (text) slicer - this slicer should be dynamic based on an option selected on another ("Data Set") slicer.

 

The 12 months are to be used as column titles for a data table.

This 12 months would show the first X historical months and the remaining Y "budget" or "forecast" months.

However, my model is currently showing both Budget & Forecast months.
I need it to show Budget or Forecast months only based on the ("Data Set") slicer value selected.

Please see below image and attached PBIX file.
Any suggestions and work arounds much appreciated.

Month Titles.PNG

1 ACCEPTED SOLUTION
Khang
Frequent Visitor

I have found a work around for this, it's not elegant but it works.

Thank you all for replies.

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

You cannot use your data model for that slicer. It needs to be fed by a disconnected table that has Months and  Index columns for all possible variations.  Then in your data model you need to read the selected value(s) of the slicer and compute your measures accordingly.

Hi Ibendlin,

 

The slicer needs to be filtered in the context of both "Last Period" slicer and "Financial Year" slicer, then further filtered by "Data Set" slicer.


I have given your suggestion a go but it doesn't resolve the problem of the dates for Budget & Forecast periods overlapping. Which results in the dual month titles still present as shown in the above image.

Are you able to show a working example?
Thanks for your effort and response to this.

Khang
Frequent Visitor

I have found a work around for this, it's not elegant but it works.

Thank you all for replies.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors