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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
FelipeCeballos
Frequent Visitor

Advanced Slicer Groups - Single Data Source, synchronized unrelated Slicers.

I feel like I could be complicating this a bit, hopefully there is a better solution. I have two parameters which each selection option is using a separate measure. Each one work fine independently, however, I want to connect them somehow with the intention of controlling both slicers from only 1 dropdown single select. The order list will match and I have only 3 options on each.

 

Let’s say that I’m looking at Country and Currency, but this is not my case, this example is just simplifying my challenge.

 

Below are some table visuals

Param 1Order
United States0
Canada1
Mexico2

Then I have another which would be something like:

Param 2Order
USD0
CAD1
MXN2

 

As mentioned, the data is completely unrelated, but I would like to create something when if I select from Params 1 Measure "United States", then my Line & Clustered Bar chart will update the calculations for "United States" and  on respectively "USD". 

 

 The user will never need the option on my case to see the United States with MXN pesos. Again, this was just an example… I don’t need to solve this on real case, I know better ways to do that.

 

In advance, thanks for the guidance!

1 ACCEPTED SOLUTION

It might be a little annoying to do, but if you are looking to have titles change dynamically on what you select from your slicer. You could add some logic to the titles using IF(), SELECTEDVALUE(), or SWITCH().

 

Something like:


YourDynamicTitle=
SWITCH (
TRUE (),
SELECTEDVALUE('Table'[Column]) = "UnitedStates", "USD",
SELECTEDVALUE('Table'[Column]) = "Canada", "CAD",
SELECTEDVALUE('Table'[Column]) = "Mexico", "MXN",
"Default Result"
)

Or even:

IF( SELECTEDVALUE('Table'[Column]) = 'United States', 'Sales for United States, IF(.....

 

Im not going to type it all out but basically you would need to nest a bunch of IFs inside each other to handle all the scenarios of what you want to be displayed in your Title card based off of the slicer selection.

If this helps you out please consider marking it as the solution.👍

View solution in original post

4 REPLIES 4
FelipeCeballos
Frequent Visitor

Thanks for your reponse, CalebR!

I implemented the concept of creating a separate table and using it as a slicer in my Power BI report. I then created two measures that depend on the selected value from the slicer.

The concept works perfectly, and I'm getting the correct values. However, I've encountered an issue with the titles not being dynamic.

While it's not an ideal situation, for now, the solution I see is to replicate the same chart and use bookmarks to control which chart is displayed based on the user's selection.

I'm currently transitioning from Tableau to Power BI, and my Tableau dashboards frequently utilize this concept. I'm somewhat surprised to find that there isn't a direct one-to-one mapping of this logic in Power BI.

It might be a little annoying to do, but if you are looking to have titles change dynamically on what you select from your slicer. You could add some logic to the titles using IF(), SELECTEDVALUE(), or SWITCH().

 

Something like:


YourDynamicTitle=
SWITCH (
TRUE (),
SELECTEDVALUE('Table'[Column]) = "UnitedStates", "USD",
SELECTEDVALUE('Table'[Column]) = "Canada", "CAD",
SELECTEDVALUE('Table'[Column]) = "Mexico", "MXN",
"Default Result"
)

Or even:

IF( SELECTEDVALUE('Table'[Column]) = 'United States', 'Sales for United States, IF(.....

 

Im not going to type it all out but basically you would need to nest a bunch of IFs inside each other to handle all the scenarios of what you want to be displayed in your Title card based off of the slicer selection.

If this helps you out please consider marking it as the solution.👍

I also just realized you may be talking about the titles of the visuals themselves. In that case you should be able to go into General settings on the visual, expand the Title section, and hit the fx button. That will allow you to select a measure to dynamically update the title. 

CalebR
Resolver I
Resolver I

Hmmmm Im thinking you could create a unique data table (I know this isnt your exact scenario) where you have both the values you are trying to filter by, so that you can relate them together? So in the instance of your example:

Custom_Table:

Param1Param2
United StatesUSD
MexicoMXN
CanadaCAD

 

Join the respective tables on what they contain, so if you have a orders table that lists the full country out connect that on 'Param1' and your other table on Param2. Then in your slicer use the columns FROM your custom table to filter by that. Therefor when you select 'United States', it automatically filters through 'USD' and into the other table that the values listed in USD. 

Obviously though im not 100% sure if this is even possible with what you want to do/what your data is. If you have a million different combos you probably dont want to create a giant custom table like I said. In that case Id look at some way of merging the tables/queries together to act as your custom table. If you want to provide an example pbix file Id be willing to take a closer look for you.

 

Best of luck

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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