Slicing by Measure Categories in Power BI

Поділитися
Вставка
  • Опубліковано 12 лип 2021
  • In this Power BI tutorial, you'll learn how to filter based on a measure value! In this example, we have a measure that evaluates out to a few different options, which we can then slice by. This is not easy to do in Power BI out of the box, so you must use some clever visual-level filters to slice your visuals, but the end result is fantastic! See below for the PBIX download.
    To enroll in my introductory or advanced Power BI courses:
    training.bielite.com/
    Blog Post/PBIX Download:
    bielite.com/blog/filter-categ...
    Elite Power BI Consulting:
    bielite.com/
    Data Insights Tools:
    www.impktful.com/
    Connect with me on Twitter!
    / powerbielite
  • Наука та технологія

КОМЕНТАРІ • 107

  • @exOr0808
    @exOr0808 2 місяці тому +1

    This solution has helped me many times over the years, thank you for your video. Only one small suggestion I have is to use 'Blank()' as opposed to '0' in the Switch statement. Otherwise Power BI is forced to show all possible records and not just the ones which have data.

  • @tanyacraig2672
    @tanyacraig2672 2 роки тому

    This is brilliant, thank you so much. I've been battling with slicing by a measure very similar to this for hours ! Really clearly explained and loved the step of adding the filter column in to show how it worked.

  • @csrajaraman
    @csrajaraman 3 роки тому +2

    This is amazing. I had given up slicing by measure and created a calculated column. Thanks a lot.

  • @discrate
    @discrate 3 роки тому +8

    Your pbi videos are very well explained. As fast as needed and efficient. I really appreciate the work you invest in your tutorials. Keep up the good work Parker!

    • @BIElite
      @BIElite  3 роки тому

      Thank you! That’s a compliment that I really appreciate from a viewer.

  • @hoongary
    @hoongary Рік тому +1

    Brilliant, thank you!
    I've been looking for this solution for 2 days now, I've hit a dead end with dynamic segmentation and spent a lot of time there (which was also useful but not for my scenario), when I needed this solution all along.

  • @TheBenLemonade
    @TheBenLemonade 2 роки тому +1

    Can't believe this is so complicated, but thanks for doing this in such a succinct and understandable way. Cheers!

  • @nmprofessional
    @nmprofessional Рік тому

    Great video and super well explained. This is the only option that works for me without killing the PBI database with countless server calls.

  • @faustomy
    @faustomy 2 роки тому

    Was looking for this solution for weeks!!! Excellent video an very well explained!!!

  • @xuhan9375
    @xuhan9375 Рік тому

    thank you it works...It's quite simple in tableau, didn't expect to be this complicated in PBI.

  • @rafaeldeyta6863
    @rafaeldeyta6863 Рік тому

    I tried to find it during 3 days and finally I got it. Thank so much!!!

  • @carn9977
    @carn9977 2 роки тому +1

    Good stuff bro. Helping me crush it at work !! Love the content

  • @jimitbhayani4127
    @jimitbhayani4127 3 роки тому

    Very nice way of explaining the concept, makes this look so simple. Thanks for sharing. :)

  • @paulwilding
    @paulwilding 3 роки тому +1

    This is such a simple yet powerful tip, thanks so much for sharing !

    • @BIElite
      @BIElite  3 роки тому

      Of course, Paul!

  • @phonte2011
    @phonte2011 2 роки тому

    I am brazilian, thank yo so much!! God Blessyou and your family

  • @simaocoimbra
    @simaocoimbra 2 роки тому

    Excellent video and very well explained. By any chance there is a way to add the "measure_filter" to the panel to filter all pages?

  • @kuttapayis573
    @kuttapayis573 5 місяців тому

    Great! This is exactly what I have been searching for.

  • @vivekkp4628
    @vivekkp4628 Рік тому

    Thanks a ton ! Saved me loads of time and effort

  • @emmafeng55
    @emmafeng55 2 роки тому

    This is exactly what I am looking for!!! thanks heaps!!! :)

  • @justinthobela1209
    @justinthobela1209 3 роки тому

    Hi. This is really good thanks. I have one quick question though, I'm struggling to represent this in a Pie Chart, any tips?

  • @Badmintonistahajnal
    @Badmintonistahajnal 3 роки тому

    Great video! Learned a lot by doing the steps with you. In my case I wanted to give the "Sales class" measure to a map visual (I have the coordinates) in the legend section (basically to color the customers which had Incresed sales, decreased sales and so on) but the map visual is not letting me do it ;(. Do you know the why maybe and how to fix it?

  • @rauljimenez5485
    @rauljimenez5485 3 роки тому +1

    Simple yet very powerful!!! Thank you for sharing!

    • @BIElite
      @BIElite  3 роки тому +1

      No problem, Raul!

  • @erikacc5750
    @erikacc5750 2 роки тому

    very enlightening!!! :) .. question ... is there a way to propagate the selection to other visuals in the same page which uses other linked queries through i.e. the customer filed ? or make the filter status=1 to all the page(s)?

  • @tak0331
    @tak0331 3 роки тому

    Wow, just tip is right on time! Thank you for sharing.

  • @swebber2825
    @swebber2825 2 роки тому

    Fantastic video. Thank you!

  • @janekkaup2092
    @janekkaup2092 3 роки тому

    Also fits well with each monthly energy report
    Well explained

  • @danielsiffredi8403
    @danielsiffredi8403 2 роки тому

    excellent video, is there any way to do the same at a page level instead of visual level?

  • @ksendhil
    @ksendhil Рік тому

    I found this very useful. Thanks!

  • @PallaviChauhan91
    @PallaviChauhan91 2 роки тому +1

    Thank you so much for clarifying this concept!

  • @MrBodies07
    @MrBodies07 Рік тому

    Great stuff man - Using this!

  • @mortenruus126
    @mortenruus126 11 місяців тому

    Very well explained. I used this trick in a Supplier Dashboard to categorize my suppliers by A, B, C and D. Will the filtering also work on card visual e.g. if you want filter 'Decreased Sales' and show show '2021 sales' in the visual card?

  • @muhammadyaseen8042
    @muhammadyaseen8042 3 місяці тому

    This video helps a lot. I have a quite similar scenario but on selection of filter, Totals in data table are missing. Can somebody help in this?

  • @peterredgray2008
    @peterredgray2008 2 роки тому

    Thanks for the video, how possible is it to do this for a measure that is generated by other measures? For example I have a measure (called Error) that returns a string based on the values of other measures that have different rules to identify errors. I want to be able to slice on the string values that is outputted from the Error measure. Following this tutorial it does not work for my scenario.

  • @jimmycarlin243
    @jimmycarlin243 2 роки тому

    This was awesome! Great content!

  • @conleyyang4318
    @conleyyang4318 3 роки тому

    thanks for the video!! some follow-up questions. Is it possible to have this measure in the visual but without 2020 Sales and 2021 Sales. for example, I just want to see for each customer which sales category they fall in and how many orders each customer has. And on top of that, can I use that calculated measure in the first column and use it to count how many customers each category has by counting the customer id?

  • @AlejandroCalderon2094
    @AlejandroCalderon2094 2 роки тому

    How would this work if you wanted a multiple selection on a single filter? Could you pass this through the values function?

  • @paulrockliffe2378
    @paulrockliffe2378 3 роки тому +4

    This is a great fix, a problem I'd given up trying to solve, so I'm sure it'll get a lot of use, thanks! It is the sort of thing Microsoft should be designing into Power BI though.

    • @BIElite
      @BIElite  3 роки тому

      I'd love to see that. No idea what this would take on the backend though...

    • @VladMZ
      @VladMZ 3 роки тому

      Power BI is missing a number of simple features that prevents them from taking over the world. For example, in government and enterprise accounting it is important to be able to have more than one hierarchical columns (expandable/collapsible), because there are hierarchies in almost every segment of chart of accounts. Because Power BI's matrix visual doesn't allow for that, the tool is useless in a lot of very lucrative clients.

  • @jdlopez131
    @jdlopez131 2 роки тому

    Is it possible to create a table of those filters you created to sum sales by those groups? In other words, sum sales and break it down by the groups from the measure

  • @mariapradeepm
    @mariapradeepm 3 роки тому

    Thanks for the video, I have one quick doubt! Why can't we create a relationship between 2 tables, So automatically filter will happen instead of new measure, Rite? Please let me know!

  • @aminegatou4492
    @aminegatou4492 2 роки тому

    Hey, I need the same thing but filter cards using this method

  • @Parulmittal-wk3mp
    @Parulmittal-wk3mp 3 роки тому +1

    Thanks a lot I was looking for such amazing tutorial 🤗

    • @BIElite
      @BIElite  3 роки тому +1

      No problem, Parul!

  • @VladMZ
    @VladMZ 3 роки тому

    This is really useful. Thanks!

  • @Pooja-pd1ee
    @Pooja-pd1ee 3 роки тому

    So I have around 50+ measures created in the report and would want to group them in some way and use that group to select the particular set of measures. Is there a way that could be achieved? Unpivoting isn't an option as all calculations are getting evaluated at report level.

  • @falutaope2800
    @falutaope2800 4 місяці тому

    Great video and thanks for the tutorial.
    I currently stuck with something similar.
    Can I use a categorical measure to filter a numeric axis (say the y-axis of a bar chart)?

  • @agustinrajan8621
    @agustinrajan8621 Рік тому +1

    How to do it on a card visual.. As here for table we can use filters but hwo about a card visual?

  • @ibrahimfares3086
    @ibrahimfares3086 2 роки тому

    Great video!

  • @mcnater
    @mcnater 3 роки тому +1

    Really like this method. Thanks for the vid.

    • @BIElite
      @BIElite  3 роки тому

      No problem, Nate! Thanks for the watch.

  • @sanjaysubair9268
    @sanjaysubair9268 2 роки тому

    Thanks. This was a life saver

  • @SauravPTx
    @SauravPTx Рік тому

    Thank you so much! You are amazing!!!!!

  • @kundaninetshiongolwe454
    @kundaninetshiongolwe454 3 місяці тому

    Thanks a lot ! is it possible that it can be a multi select o it's strictly single select ?

  • @nureyna629
    @nureyna629 2 роки тому

    Very informative. thank you so much.

  • @buckyberg
    @buckyberg 3 роки тому +2

    Finally!! Great job...thank you!

    • @BIElite
      @BIElite  3 роки тому

      No problem, Marc!

  • @waldemarvogt66
    @waldemarvogt66 5 місяців тому

    Hello, this solution is brilliant, thank you! However I have one issue, I'm not able to drop my Filter Status to Filters tab. Any advice what you be a reason for that?

  • @flintshire5564
    @flintshire5564 2 роки тому +9

    Thank you so much, that's really brilliant! I'm just wondering what if it's a multi-selection scenario for the slicer, how should we modify the code for Filter Status?

    • @ignaciogargiulo7519
      @ignaciogargiulo7519 11 місяців тому +2

      You can change the SELECTEDVALUE() for ALLSELECTED(). But then, instead of doing CurrentSelection = "Increased Sales" && .... , you should do "Increased Sales" IN CurrentSelection && .... That should work.

  • @t4k3none
    @t4k3none 2 роки тому

    This was great, thank you so much

  • @katarzynalaskowska4740
    @katarzynalaskowska4740 10 місяців тому

    Thanks! Helped a lot.

  • @giorgioguirreri1800
    @giorgioguirreri1800 2 роки тому

    Amazing! Why It doesn't work with graph?

  • @mrdave6901
    @mrdave6901 2 роки тому

    best explanation ever!

  • @tinaflemons263
    @tinaflemons263 2 роки тому

    Is there another way to download the pbix file?

  • @rajkumarrajan8059
    @rajkumarrajan8059 11 місяців тому

    can we implement this in Power Pivot

  • @stuartsmith801
    @stuartsmith801 10 місяців тому

    When using a "Dropdown" slicer, how do you get it to show "all" records by default.

  • @Drdry8
    @Drdry8 3 роки тому +1

    Very easy and alternative method 👌!!!

    • @BIElite
      @BIElite  3 роки тому

      Glad to hear!!

  • @mikej62
    @mikej62 Рік тому

    How about multi select option? How would that work? I’ve only seen single select solutions. Tia!!

  • @matiastaurizano299
    @matiastaurizano299 2 роки тому

    Thank you buddy!

  • @BuiQuynhNhu
    @BuiQuynhNhu 2 роки тому +1

    It is awesome. I finished 3 of your courses from BI Elite site. I must say I miss your voice haha.

    • @BIElite
      @BIElite  2 роки тому

      Hahahah I love it

  • @shamf6624
    @shamf6624 3 роки тому +1

    Very helpful. Thankyou

    • @BIElite
      @BIElite  3 роки тому

      No problem Sham!

  • @ajitchaudhary4444
    @ajitchaudhary4444 2 роки тому

    Very helpful.

  • @yiyiwang8861
    @yiyiwang8861 Рік тому

    This is amazing and brilliant. I need to have multi selections for my filter, but this trick doesn't work for multiselection. How can I adjust to adapt to multiselection? Thank you in advance!

    • @ignaciogargiulo7519
      @ignaciogargiulo7519 11 місяців тому

      In the Filter Status Measure, you can change the SELECTEDVALUE() function for ALLSELECTED(), but then that would return a number of rows >1. So you need also to change the logic of the SWITCH function. Instead of doing CurrentSelection = "Increased Sales " && ..... you should do: "Increased Selection" IN CurrentSelection && ....

  • @dsapraveen
    @dsapraveen 3 роки тому

    Thank You for sharing an amazing tip, I have a small query, in SWITCH case instead of multiple compare statements, can we just write below statement instead:
    SWITCH(
    TRUE(),
    Selection = CurrentStatus, 1,
    Selection = "All Customers", 1,
    BLANK()
    )

  • @rossdan4098
    @rossdan4098 3 роки тому

    What’s the benefit of this method over adding a calculated column to determine the class + a slicer on the calculated column

    • @BIElite
      @BIElite  3 роки тому

      That wouldn’t be dynamic based on other slicer selections or cross filtering! I was hoping to explain this properly in the intro section. Hope this helps!

  • @juanodonnell
    @juanodonnell 3 місяці тому

    wouldn't it be simpler/easier if in the switch statement you start with all customers,1 and then generalize with currentSelection=currentClass,1 and have the same functionality? the order of the switch conditions is important?

  • @AkshayKumar-oy9uo
    @AkshayKumar-oy9uo Рік тому

    Can you please provide me the data for this project

  • @alakmarshafin6326
    @alakmarshafin6326 2 роки тому

    LIFE SAVER

  • @zuzanabocanski6580
    @zuzanabocanski6580 9 місяців тому

    Thanks!

  • @dmitrikochubei3569
    @dmitrikochubei3569 2 роки тому

    THANK YOU!!!

  • @emilymalkin270
    @emilymalkin270 3 місяці тому

    I am sad I can’t do it with live connection 😢

  • @SanataniAryavrat
    @SanataniAryavrat 3 роки тому

    Great trick 👏👏👏👍👌👌🥇

  • @mehdihammadi6145
    @mehdihammadi6145 3 роки тому +1

    Simple but efficient 😁

    • @BIElite
      @BIElite  3 роки тому

      Yes, indeed :)

  • @rusfinance1
    @rusfinance1 3 роки тому +1

    Cool! Thank you)

    • @BIElite
      @BIElite  3 роки тому

      No worries, Rus!

  • @robidadurgaan
    @robidadurgaan 3 роки тому

    I believe 'ChicletSlicer' does the same thing, isn't it?

    • @BIElite
      @BIElite  3 роки тому +1

      No, unfortunately. There's no out of the box way to slice on a measure. You have to use DAX!

    • @robidadurgaan
      @robidadurgaan 3 роки тому

      @@BIElite Got it, thanks

  • @simphiwe_stb
    @simphiwe_stb 3 місяці тому

    neat

  • @sahameed
    @sahameed 3 роки тому +1

    Thats interesting 🤔

    • @BIElite
      @BIElite  3 роки тому +1

      Yes, I think so too 😁

  • @bbubarker
    @bbubarker 3 роки тому

    A great solution, but I find your video quality is in need of improvement

    • @BIElite
      @BIElite  3 роки тому

      Hi Butch, could you share any recommendations? I’m always trying to make the content better.

    • @bbubarker
      @bbubarker 3 роки тому

      @@BIElite Not really as I don't know what causes it but your videos are very blurry to me I have a very high resolution monitor, perhaps you need to increase the resolution you are recording with.