Power BI - Directly Compare Two Categories (Slicer Filters Other Slicer)

Поділитися
Вставка
  • Опубліковано 4 вер 2024

КОМЕНТАРІ • 65

  • @sabanasir83
    @sabanasir83 Місяць тому

    Fantastic. I went through so much stuff but this is a jackpot! thank you for this✌

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

    I've been binge watching all your videos, and the learnings are just so much. Thank you

  • @tamasbencsik4661
    @tamasbencsik4661 2 роки тому +2

    BRILLIANT!! I have been looking for this for so long now! Thank you for the great explanation!

  • @jerriclark3904
    @jerriclark3904 3 роки тому +6

    Thank you so much for this! Can you please show how we can sum multiple categories in each slicer for comparison? For example, the sum of sales in California and Washington, vs the sum of sales in 5 other states.

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

      still dindt find this anywhere xD

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

      Just finished the video and solved the question ehhehe make these other 2 Measures
      Mind the tables and column names
      Sales Category Comparisson First Sales =
      CALCULATE(
      SUM(sales[Sales Value]),
      FILTER(
      products,
      products[Product_Category]
      in
      {
      SELECTEDVALUE(_CategoryFist[Product_Category])
      }
      )
      )
      Sales Category Comparisson Second Sales =
      CALCULATE(
      SUM(sales[Sales Value]),
      FILTER(
      products,
      products[Product_Category]
      in
      {
      SELECTEDVALUE(_CategorySecond[Product_Category])
      }
      )
      )
      Now you can calculate difference between them and fixed all the problems rly easy :D

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

      If you want have it that when you dont select something to use the all value instead of blank you do like
      **Mind tables and column names
      Sales Category Comparison First Sales =
      VAR SelectectFilter =
      CALCULATE(
      SUM(sales[Sales Value]),
      FILTER(
      products,
      products[Product_Category]
      in
      {
      SELECTEDVALUE(_CategoryFist[Product_Category])
      }
      )
      )
      RETURN if( ISBLANK(SelectectFilter),SUM(sales[Sales Value]),SelectectFilter)//

    • @rajeevgupta6549
      @rajeevgupta6549 2 місяці тому

      @@welcometomathy Can you please help me to select one value from first slicer and all values from second slicer. Please help me write DAX function?

  • @hazel-hanavu3824
    @hazel-hanavu3824 2 роки тому +1

    Clear-cut presentation and DAX use! I'm so glad I stumbled upon your video. Subscribed!

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

    Awesome! You saved to me lots of learning time by publishing this clear and well-described solution.

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

    looking for exact scenario , thanks

  • @jaimeekatz7770
    @jaimeekatz7770 3 роки тому +5

    This is awesome, thank you! Is there a way to create a measure that displays the variance of the two selections?

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

      This is what I need too! Please suggest if you found something out on this!!

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

      Would like to know about this too Thanks!

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

      I made a measure that subtracts the selected value of the first selection (similar to: calculate [total sales], filter(categories, categories[category name] in selectedvalue('firstselection'[category name])) from the selected value of the second selection, and drags this measure to a table to show the variance between the two.

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

      @@BellaLuGuzheng Care to put here how you did it? I can't seem to be able to do it.

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

    Great Video ❤❤!! This was exactly my requirement and now I have achieved that with the help of this video. Just one more thing I would like to know, I have 4 Visuals on a page and 3 of them I have created using measures as explained in the video, but one of them is a Table visual which is utilizing only the fields from the source table and no measure is used in that table visual, so that table visual is not filtering out based on the slicer selection, can you please help with that, it would be really helpful. Thanks 😊

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

    but i don't have measure to use in my Gantt chart so in this case how to proceed. appreciate your response

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

    If we enable multiple selection in the second slicer, will it still work? Or what should be the change in the dax measure?

  • @amansingh_1912
    @amansingh_1912 7 місяців тому

    Useful one, but my question here is if we are creating a dashboard in page where we are using "category name" as a slicer too and then I want to use it, then according to the slicer I don't want to change this slicers, how to make it possible

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

    Excellent explanation. Thank you very much!

  • @tiagopardo7989
    @tiagopardo7989 7 місяців тому

    I've been looking that for so long.

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

    Great! i wonder if its possible to create a filter out a filter, lets say one main filter in which you select the measure to compare and based on this selection Filters A and B can be compared

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

    great work..this is in my current requirement but i couldn't achieve. Now i will implement the same..thank you

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

    Exactly what i am looking for. Thank you!

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

    how about multiple second scenario selection?

  • @121balu
    @121balu 6 місяців тому

    Is there any way, I will select a category name and in table gets brand name and if I select it should get sub category name in same table

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

    Is there a way to show the intersection of the categories? For example, On the first slicer selection show all products, on the second slicer selection add the Products which are common for the Slicer 1 and 2 categories. If there are no Products that belong to both categories show blank?

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

    How did you calculate total sales? Thank you

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

    Super helpful! great job & Thanks for sharing!

  • @remyap.c3450
    @remyap.c3450 2 роки тому

    Is it possible get the same scenario where first slicer is single selection and the other slicer with multiple selection ?

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

    Great tip! Thanks!! I will give it a try. However, is it possible to use a similar approach to more than 2 slicers?

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

      Hey Felipe, yes it is possible! Though the logic gets more complicated with each additional slicer. If you add a 3rd slicer, the measure for filtering the slicers will look like this:
      Category Selection Filter =
      IF(
      SELECTEDVALUE('First Selection'[Category Name]) = SELECTEDVALUE('Second Selection'[Category Name])
      || SELECTEDVALUE('First Selection'[Category Name]) = SELECTEDVALUE('Third Selection'[Category Name])
      || SELECTEDVALUE('Second Selection'[Category Name]) = SELECTEDVALUE('Third Selection'[Category Name]),
      0,
      1
      )
      Also remember to add the 3rd slicer selection to the measure used for visualization.

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

      @@BIElite Amazing! Thanks.

    • @1sefirot9
      @1sefirot9 3 роки тому

      @@BIElite Maybe this condition could be expressed more briefly and in a general form by comparing a COUNT of {} of all SELECTEDVALUES with a
      DISTINCTCOUNT of the same thing, or alternatively an INTERSECTION of two sets. Will give it a try when the need for this pattern arises in our dashboards, otherwise great pattern.

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

    I created multiple queries from two columns of small table, made it unique & created relationship. Intention is to create relational filter but no didn't work ?

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

    Thats really awesome Parker !! Thanks for sharing :)

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

    Hello, very helpful, thank you very much - I am wondering about one thing. I am using the technique in multiple charts on one page to compare stats of two countries (out of the global list of about 250). In order to keep the the page readable, I would need the used colors uniform and fixed to the first/second selected country acros all visuals on the page. However, the colors reset after each change of the selection. Can you think of a way to prevent this behavior and have two chosen colors stick to the first/second choice respectively independent of their values?

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

      I figured it out now and successfully applied it in this covid dashboard lnkd.in/d4PCCmy - the second page of the report - side by side comparison is mainly based on the technique presented in your video - thanks again!

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

    Hi, how to select only one option in two different filters? example: In Filttro 1 it has the options (A, B ,C) and in Filttro 2 it has the options (D,E,F). So, how to select only 1 option among all options (A,B,C,D,E,F)?

  • @user-kg2ek3ux1d
    @user-kg2ek3ux1d 9 місяців тому

    hello, I want to make this but for the same measure. For example I want to create the the total sales of a single category but I want to compare the sales by year. In this case the two slicers that I need are the slicer of year number and my x-axis is going to be the month. I did what is in the video but instead of using the category names in the slicer I used the year but that is not working. Does anyone have the solution for this?

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

    That was brilliant! Thanks a lot!

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

    Report is interacting with main category only not with other slicer, i am creating bar chart

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

    Hi @BI Elite, will this work for Drop-down slicer?

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

    Can you sync existing slicers to these new slicers?

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

    what if we want compare more than 2 ? like 3 or as many as we want?

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

    Very cool! Thank you!

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

      Thanks for watching, Michael!

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

    Nice one!

  • @nareshch-zp7yi
    @nareshch-zp7yi Рік тому

    if we apply one categorgy at one slicer can you explain it

  • @vikramsingh-ws2nn
    @vikramsingh-ws2nn 3 роки тому

    Thank you so much BI Elite. I am your fine

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

    Just great !!. Thanks for sharing

  • @user-ol5bc6sc1o
    @user-ol5bc6sc1o Рік тому

    Thank you soo much

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

    Awesome, thanks

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

    Does it only work with single select?

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

      @BI Elite: I have the same problem. does it work only with single select? I have the same requirement wherein I have one single select and one multi select slicer for the same category and I need my chart to be filtered with all the values selected from both slicers. Is this possible? Please reply.

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

    Hi Parker.
    Great Video!! like always, Thank you very much,
    one small request, can you please kindly remove the Sadow on your mouse pointer.
    I love your videos, but the shadow, I really don't know how many other people feel the same but it very much discomforting the eye. Maybe it's just me.
    Will be really grateful if you can remove it. At end of the day, it's your channel. :)
    Thank you

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

    Sorry, but I can't see the advantage in having the chart controlled by 2 slicers instead than by one. Thank you.

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

      This is useful for making direct A vs B comparisons. Imagine you have 100 employees and you want to compare Employee A vs Employee B. With a single slicer, the default will show all 100 employees. You can always select 2 employees, but it'll be a mess when you undo the selection. With the method from this video, you are forcing Power BI (and the user) to only show 2 categories at a time, no more no less.

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

      Thanks@@BIElite , I got it.

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

      No problem! Thanks for watching

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

    Gr8

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

    where the hell `total sales` measure came from!!!

  • @nikakalichava8012
    @nikakalichava8012 2 місяці тому

    lifesaver. TY!