Forum Discussion

littlemojopuppy's avatar
littlemojopuppy
Icon for Community Champion rankCommunity Champion
2 years ago
Solved

Measures Including Context From A Specific Slicer

Here's an interesting use case...I have someone who wants to compare forecast vs. actual for two different promotions on the same page.  Kind of like this, where the blue slicer controls only the blue chart and same with orange.

This is easy enough to do by editing the interactions between blue and orange visuals.

 

Here's where it gets weird: they want to create measures that will compare values between the blue and orange visualizations (in this case compare blue Jan 2023 to orange Jan 2023, and so on).  In short, there needs to be one measure that only takes context from the blue slicer, another from only the orange slicer.  Best I can think of would be to include logic for minimum and maximum selected values to differentiate between the two slicers.

 

But I'm curious if anyone is aware of another way to include logic of essentially "value from this slicer only" or "ignore that slicer".

 

Thanks in advance!  🙂

  • littlemojopuppy Thanks for the kind words. 🙏

     

    Regardless of what you do, using a single table will not able to tell what is the value of a blue slicer and what is the value of an orange slicer. 

     

    I will not be very comfortable putting a solution together based on a single table. I know it will not scale and down the road will lead to some frustrations.

     

    Just my 2 cents.

9 Replies

  • littlemojopuppy disconnected table will be the way to go. One slicer is coming from a disconnected table and then it is super easy.

     

    Min and Max might not work in case there is an option for multiple selections on the slicer - with a disconnected table it will be super easy to handle.

    • littlemojopuppy's avatar
      littlemojopuppy
      Icon for Community Champion rankCommunity Champion

      Hi parry2k

       

      I don't think I'm going to be allowed to have a disconnected table for the slicer - "enterprise" model, very strict design standards to adhere to. 😣

       

      But you're right...that would work in a smaller use case.

  • littlemojopuppy you will be doing lot of dax dance without it specially if slicer is a multi select. Also will be hard to figure out with min and max which visual it is for 🤷‍♂️

    • littlemojopuppy's avatar
      littlemojopuppy
      Icon for Community Champion rankCommunity Champion

      parry2k agree.  I can't think of a DAX way to exclude one slicer from filter context but not the other when they're both slicing on the same field.  And I really wouldn't be able to tell which slicer a given measure is for because there is no guarantee that Event Code in the slicer will be unique because of bad data.  I'd have to use the bigint PK from the data lake.  Which would really make knowing which is min vs. max practically impossible.

       

      But thank you!  You're brillant with Power BI so maybe this will randomly pop into your head sometime in a light bulb moment.  🙂

  • littlemojopuppy Thanks for the kind words. 🙏

     

    Regardless of what you do, using a single table will not able to tell what is the value of a blue slicer and what is the value of an orange slicer. 

     

    I will not be very comfortable putting a solution together based on a single table. I know it will not scale and down the road will lead to some frustrations.

     

    Just my 2 cents.

    • littlemojopuppy's avatar
      littlemojopuppy
      Icon for Community Champion rankCommunity Champion

      parry2k not at all arguing with you!  And I completely agree with you.  You've forgotten more about Power BI than I ever knew...I hope I didn't offend!  🙂

       

      I think a lot of what's being attempted is right idea, wrong implementation of the idea.

  • littlemojopuppy lol - not at all. I'm just making sure that you are not trying to put together something that will temporarily (maybe) work - and then in a few weeks/months you are back on the drawing board.

     

    We both are on the same page. Thank you!