Grouping & Segmenting Your Data With DAX Measure Logic - Advanced DAX

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ธ.ค. 2024

ความคิดเห็น • 69

  • @EnterpriseDNA
    @EnterpriseDNA  5 ปีที่แล้ว +2

    ***** Related Links *****
    Advanced Segmentation Example Using DAX in Power BI - blog.enterprisedna.co/2017/10/31/advanced-segmentation-example-using-dax-in-power-bi/
    Group Customers Dynamically By Their Ranking w/DAX In Power BI - blog.enterprisedna.co/2017/11/29/group-customers-dynamically-by-their-ranking-wdax-in-power-bi/
    Learn Which Customer Groups Experienced The Greatest Growth - Power BI & DAX - blog.enterprisedna.co/2018/07/18/know-which-customer-groups-experienced-the-greatest-growth-power-bi-dax/
    ***** Related Course Modules *****
    Advanced DAX Combinations - portal.enterprisedna.co/p/advanced-dax-combinations
    Unique Analytical Scenarios - portal.enterprisedna.co/p/unique-analytical-scenarios
    Learning Summit Series - portal.enterprisedna.co/p/learning-summit-series
    ***** Related Support Forum Posts *****
    Data grouping and missing month - forum.enterprisedna.co/t/data-grouping-and-missing-month/2238
    General Ledger Grouping - forum.enterprisedna.co/t/general-ledger-grouping/78
    Dynamic Grouping - Last Month Value - forum.enterprisedna.co/t/dynamic-grouping-last-month-value/1275
    For more grouping data support queries to review see here -
    forum.enterprisedna.co/search?q=grouping%20data

  • @liranzaidman1610
    @liranzaidman1610 5 ปีที่แล้ว +18

    Finally someone with a real knowledge in DAX, and also knows how to explain the logic.
    Thanks man, these videos are a true gold nugget.

  • @cesarsaldana3429
    @cesarsaldana3429 2 ปีที่แล้ว +1

    Amazing!!!!... Greetings from Mexico.

  • @Motivation_3_33
    @Motivation_3_33 ปีที่แล้ว +1

    Thank you for the tutorial, I am working on the same scenario. I have created the table and but there is a catch in my case I am calculating rank a column (suppose sales) and taking total of another colums (commission) the logic working fine where commission column has all the values but where some agents have commission missing it is giving incorrect, basically i want to calculate the total only if all the values are present

    • @EnterpriseDNA
      @EnterpriseDNA  ปีที่แล้ว

      Hi @Motivation_3_33,
      It's a bit difficult to assess and give recommendation without looking at the data structure, model and working of the PBIX file for the reference. You can reach out to us on our Community Forum by providing a detailed description of your query along with relevant files for reference. Our members and team of Experts will be happy to help out!
      If you haven't yet, do subscribe to our TH-cam channel and LinkedIn group to keep posted on the latest data skills and tools updates.
      Cheers,
      Enterprise DNA
      forum.enterprisedna.co/
      www.youtube.com/@EnterpriseDNA
      www.linkedin.com/groups/12004506/

  • @waynetai3317
    @waynetai3317 4 ปีที่แล้ว +2

    Thanks for the video. I don't really understand why we need to add the countrow and 2nd filter .. since the group is already in the filter context, won't it always return 1 row? can the DAX formula be written without the countrow and 2nd filter?

  • @sadababdullah4271
    @sadababdullah4271 4 ปีที่แล้ว

    Awesome place to lean - they way it has been arrange it phenomenal- i would request you to please make the videos on real time scenarios and complete project !!

  • @fionamehta7381
    @fionamehta7381 6 ปีที่แล้ว +3

    Really well explained, so useful too, real power of DAX, Thank you so much!

  • @guusvanzuylen6501
    @guusvanzuylen6501 6 ปีที่แล้ว

    Hi Sam,
    Very interesting.
    I figured out this, a nester SUMX formula:
    Margin Group Profits =
    SUMX (
    Products,
    SUMX (
    'Product Margin Group',
    IF (
    Products[Avg Margin] > 'Product Margin Group'[Min]
    && Products[Avg Margin]

  • @pradeepviv3672
    @pradeepviv3672 5 ปีที่แล้ว +1

    Thanks so much, all your video tutorials of high quality. Thanks once again

  • @atiqkhan9637
    @atiqkhan9637 4 ปีที่แล้ว

    great it will help me in my reporting, one thing is that i didnt get the use of countrows function

  • @steph_ferri
    @steph_ferri 5 ปีที่แล้ว +1

    Great video! I have been searching for a solution to group retailers by top 25%, top 50%, top 75% and top 100% of the retailers total sales. There are a lot of videos of finding the TopN and grouping with dax but nothing with % $sales of the store. I was hoping you could point me in the correct direction.

  • @rick_.
    @rick_. 3 ปีที่แล้ว

    Nice, thank you. I do have question: why did you use VALUES in the "Margin Group Profits" measure? Since it is the Products table that is being filtered, then "FILTER( Products, COUNTROWS(...." seems to produce the exact same end result.

  • @quiksilverz2451
    @quiksilverz2451 6 ปีที่แล้ว +3

    This is great content in helping us with a couple of our own sales initiatives. We are looking to then take it one step further to dynamically update the min and max values for each group. For example, I can look at month one and set the high medium and low, but for month two, knowing there are deals going on, the high medium low min max values need to change. Do these values always need to be hard coded, or is there a way to incorporate percent line values dynamically?

    • @EnterpriseDNA
      @EnterpriseDNA  6 ปีที่แล้ว

      What you might want to do is have a different table for your sales periods. So you might have various supporting tables. These table are hardcoded until you complete a refresh of your report. You can set up the tables so that they are created by formula, but again they would only update on refresh. Check out this video to learn more about this technique - th-cam.com/video/yhKZtaYPCts/w-d-xo.html

  • @npmnpm5501
    @npmnpm5501 7 ปีที่แล้ว +3

    Sam, how long have you been involved with BI and how long have you been writing DAX?

    • @EnterpriseDNA
      @EnterpriseDNA  7 ปีที่แล้ว +1

      Just over a couple of years now...and continuing to learn.

  • @3danim8r1
    @3danim8r1 4 ปีที่แล้ว +3

    Thanks for sharing...., Its my humble request please share the excel raw file for same so that we can practice.God bless you.

    • @wildecorrea6477
      @wildecorrea6477 4 ปีที่แล้ว

      That's it! It would be great sharing the files!

  • @jananiyagnamurthy318
    @jananiyagnamurthy318 3 ปีที่แล้ว

    Thanks a lot. can we group / segment on a formulated cell?

    • @EnterpriseDNA
      @EnterpriseDNA  3 ปีที่แล้ว

      Hello janani,
      Thank You for posting your query onto our channel.
      Well the question which you've posted is actually not quite clear to us about how you're trying to group/segment which formulated cell and what kind of results you're actually trying to achieve here. Since the cells or the results are already grouped or segmented in a given video.
      We request you to please write back to us by elaborating your query pertaining to the results that you're trying to achieve here so that we can serve you in a best possible manner.
      For furthermore queries, you can also reach out to us onto our Community Forum where our members as well as experts team will be able to assist you in a better and efficient manner. Below is the link of the forum provided for the reference as well.
      Hoping you find this helpful. Also make sure that you're subscribed to our TH-cam channel so that you don't miss out on any updates pertaining to the Power BI.
      Happy Learning!
      Thanks and Warm Regards,
      Enterprise DNA
      forum.enterprisedna.co/
      th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

  • @caylapavol8784
    @caylapavol8784 ปีที่แล้ว +1

    how do you group or bin a measure? I have a measure that is sum of units sold from the customer per year which I am trying to group into buckets (1-10,11-20,etc). How would you do this.

    • @EnterpriseDNA
      @EnterpriseDNA  ปีที่แล้ว

      Hi @caylapavol8784,
      That's what the technique is showcasing in the given video about how to group the results of a measure into a specific buckets, so we're not sure about why the same query is asked again? You can apply the techniques in your business scenario by making modifications/adjustments, as required to achieve the results.
      We're providing few of the links of the articles from our blog posts as well as links of the videos from our Enterprise DNA TH-cam channel pertaining to this topic - "Grouping, Banding or Segmentation".
      For further queries, you can also reach out to us at our Community Forum by providing a detailed description of your query along with relevant files for reference. Our members and team of Experts will be happy to help out!
      If you haven't yet, do subscribe to our TH-cam channel and LinkedIn group to keep posted on the latest data skills and tools updates.
      Hoping you find this useful!
      Cheers,
      Enterprise DNA
      forum.enterprisedna.co/
      www.youtube.com/@EnterpriseDNA
      www.linkedin.com/groups/12004506/
      blog.enterprisedna.co/power-bi-banding-segmenting-example-using-dax/
      blog.enterprisedna.co/power-bi-dynamic-grouping-banding-using-dax/
      blog.enterprisedna.co/power-bi-banding-segmenting-example-using-dax/page/46/?et_blog
      blog.enterprisedna.co/group-customers-dynamically-by-their-ranking-wdax-in-power-bi/
      th-cam.com/video/djLX6IUWVwY/w-d-xo.html
      th-cam.com/video/0HR_h6YTjzc/w-d-xo.html
      th-cam.com/video/IUI1M8HQenc/w-d-xo.html
      th-cam.com/video/MDAjt-yicDQ/w-d-xo.html
      th-cam.com/video/knF3VbCkRig/w-d-xo.html
      th-cam.com/video/AaFg33eqaE4/w-d-xo.html

  • @renusharmadhoundiyal
    @renusharmadhoundiyal ปีที่แล้ว +1

    I have 4 pricing type 12 sales total - Contract , Standard, buyin, Override. We want to see sales impact by price increase 1%, 1.5%, 2% and so on. but want to exclude buyin and override from calculating but they should return 12 sales total without any increase.
    So my total should be Contract , standard with price increase and Buying, override without price increase. I used calculate columns to use "If" and "switch"function but the result is not dynamic when i change % increase.

    • @EnterpriseDNA
      @EnterpriseDNA  ปีที่แล้ว

      Hello Renu,
      Just by going through your explanation/query we cannot implement the scenario in our model and it's always a little bit difficult to judge and provide the results without looking at the data structure, model and working of the PBIX file for the reference.
      And therefore we encourage you to please write back to us onto our Community Forum by providing the proper description of the problem that you're facing along with the PBIX file for the reference as well as the mock-up results that you're trying to achieve where our members as well as experts team will be able to assist you in a better and efficient manner. Below is the link of the forum provided for the reference.
      Hoping you find this useful! If you haven't yet, you can subscribe to our TH-cam channel so that you won't miss out on any Power BI & Power Platform updates. You can also join our LinkedIn group to receive latest updates on Power BI.
      Cheers,
      Enterprise DNA
      forum.enterprisedna.co/
      th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html
      www.linkedin.com/groups/12004506/

  • @anilkumaryarra5468
    @anilkumaryarra5468 3 ปีที่แล้ว

    This is more or like conditional column to the categories like low, mid, high. Where it actually works to the maximum potential.

  • @juansepowerplatform
    @juansepowerplatform 7 ปีที่แล้ว +1

    Hello great videos, after you inserted the calculated column with the Average Margins could you have inserted an IF logic statement column grouping the products into High, Mid or low, and at the end achieve the same result visualizations.

    • @EnterpriseDNA
      @EnterpriseDNA  7 ปีที่แล้ว

      You absolutely could in this case. Just showcasing a different way. Watch out for a following video using same technique but can't be done in calculated column

  • @alexyauk3407
    @alexyauk3407 6 ปีที่แล้ว +2

    Instead of hard-coding the profit margin group parameters, is it possible to use something dynamic? Like for example the percentile function?

  • @seanstead96
    @seanstead96 3 ปีที่แล้ว

    This is great, but how can i have the grouping of segments as a variable user input? eg different scenarios of boundaries

  • @hugobreakey1637
    @hugobreakey1637 4 ปีที่แล้ว

    Hi did you create the products table initially by using SUMMARIZE on the base data table?

  • @helenawickstrom9181
    @helenawickstrom9181 4 ปีที่แล้ว

    Hi, thanks for great video! Is there a way to create clustered and stacked column charts in Power BI, or arranging data to achieve this?

  • @rudradev4
    @rudradev4 5 ปีที่แล้ว

    you saved my day with this logic.

  • @epurusureshbabu
    @epurusureshbabu 3 ปีที่แล้ว

    Hi, I had Profit Margin measure but as mentioned in video i can't have seperate column for Margin. In this case can we group with measure directly. thank you

    • @EnterpriseDNA
      @EnterpriseDNA  3 ปีที่แล้ว

      Hello Epuru,
      Thank You for posting your query onto our channel.
      Well firstly, we're not sure what're the results you're actually trying to achieve here. And secondly, it's always a little bit difficult to judge and provide the results without looking at the data structure, model and working of the PBIX file for the reference.
      And therefore we encourage you to please write back to us onto our Community Forum by providing the proper description of the problem that you're facing alongwith the PBIX file for the reference as well as the mock-up results that you're trying to achieve where our members as well as experts team will be able to assist you in a better and efficient manner. Below is the link of the forum provided for the reference.
      Hoping you find this useful. Also make sure that you're subscribed to our TH-cam channel so that you don't miss out on any updates pertaining to the Power BI.
      Happy Learning!
      Thanks and Warm Regards,
      Enterprise DNA
      forum.enterprisedna.co/
      th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

  • @nsrchndshkh
    @nsrchndshkh 7 ปีที่แล้ว +1

    Thanks for all your videos. It would be awesome if you upload video on create TOPN and All Others in DAX and use in same chart

    • @EnterpriseDNA
      @EnterpriseDNA  7 ปีที่แล้ว +1

      I have many other videos regarding TOPN. Certainly search for those, and they will help you

    • @nsrchndshkh
      @nsrchndshkh 7 ปีที่แล้ว

      Saw that video, how to separate all other values (which are not included in TOPN)

  • @pradeepviv3672
    @pradeepviv3672 5 ปีที่แล้ว +1

    Great tutorial, thanks very much

  • @MrErolyucel
    @MrErolyucel 7 ปีที่แล้ว

    Thanks. Videos are great.Very time condensed. Sam I just started Power BI and wondering if in one report, I could use all the slicers in a page like a report filter and see all the tables and charts change in other pages. Otherwise I had to use all the slicers in every page. Thanks you in advance.

    • @EnterpriseDNA
      @EnterpriseDNA  7 ปีที่แล้ว +1

      At the moment this is not available but it is coming, I've seen a demo of it from the data insights summit this year

    • @MrErolyucel
      @MrErolyucel 7 ปีที่แล้ว

      That is a good news. Thanks for the quick response. Take care

  • @UsmanBinIhsan
    @UsmanBinIhsan 2 ปีที่แล้ว

    Thanks a lot Sam.

  • @hamzarafique3857
    @hamzarafique3857 7 ปีที่แล้ว

    Great video. I have been going through a problem that I cannot find a solution to anywhere. There are a lot of videos of finding the TopN but I was hoping if you could make a video regarding how we can identify, for example, the top 20% retailers or customers based on revenue. The key part is identifying them, rather than just return the sales volume of the top 20%.

    • @EnterpriseDNA
      @EnterpriseDNA  7 ปีที่แล้ว +1

      I'm pretty sure this explain what you require - th-cam.com/video/9LZL5awSyMM/w-d-xo.html

  • @rahulshiroor3739
    @rahulshiroor3739 5 ปีที่แล้ว

    hi Sir, Can you help me to group the same for a measure SALES % TO THE TARGET, I would like to categorize as LOW, HIGH, MED based on the SALES% to the TARGET, Please help me..

  • @kannavjamwal4510
    @kannavjamwal4510 5 ปีที่แล้ว

    i need the data set for this video. please provide link.

  • @noahhadro8213
    @noahhadro8213 6 ปีที่แล้ว +1

    why do you need count rows? Coun't you just nest the filter inside the other filter and get the same results? I'm new to DAX and still learning.

    • @EnterpriseDNA
      @EnterpriseDNA  6 ปีที่แล้ว

      Unfortunately not, because you need to somehow iterate through the supporting table and run specific logic to see what's true and what's false. FILTER wouldn't enable this type of logic required.

  • @dynamics1234
    @dynamics1234 4 ปีที่แล้ว

    Can you do a video to explain how to do cumulative or
    running sum of counts of text data. I have multiple years of data by years and
    months. The data is text, say “M”, “L” etc… in a column. I need to draw a chart
    showing both counts and running counts by months. And by a slicer of year once
    I selected a specific year then I should be able to visualize the counts and
    running counts of text of the selected year. So running counts should be for a
    selected time say year, not cumulative counts of all years starting from Min
    year to selected Max year.

  • @kennethstephani692
    @kennethstephani692 3 ปีที่แล้ว

    Great video!!

    • @EnterpriseDNA
      @EnterpriseDNA  3 ปีที่แล้ว

      Hi Kenneth Stephani, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials.
      Here’s the link: th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

  • @subhadeepsarkar7566
    @subhadeepsarkar7566 3 ปีที่แล้ว

    where can i get the datasets ?can anybody advise ?

    • @EnterpriseDNA
      @EnterpriseDNA  3 ปีที่แล้ว

      Hi subhadeep sarkar , thanks for posting your comment in the video. All pbix file/datasets are available for download in the Enterprise DNA Online, which is accessible via Membership. Find link below. Thanks!
      portal.enterprisedna.co/

  • @namanmittal7791
    @namanmittal7791 5 ปีที่แล้ว

    Hi all,.
    I have various measures in a table showing by branch : north south east west. Total is coming fine
    Now I want to see north + east also.i made a small table to lookup and group. North + east is coming but now total is increased for them.
    How to exclude one category in total or is there any other solution.?

  • @JosefineNord
    @JosefineNord 3 ปีที่แล้ว +1

    Great video!
    Is it possible to do a similar thing, just for a measure value (without calculating the average margin column).
    Ex.
    I have a table with min and max values:
    group: min: max:
    1 0 0.333
    2 0.333 0.667
    3 0.667 1
    I then have a measure, giving me a percentage.
    I want to know which group the result "relates" to.
    If my measure returns 5%, then it looks between a min and max column and then returns the result from the group column (1)
    I hope someone can help here. As I'm really struggling with this :(

    • @EnterpriseDNA
      @EnterpriseDNA  3 ปีที่แล้ว

      Hello JosefineNord,
      Thank you for posting your query onto our channel and we really appreciate you taking your time to post it.
      Well it's always a little bit difficult to judge and provide the results without looking at the data structure, model and working of the PBIX file for the reference.
      And therefore we encourage you to please write back to us onto our Community Forum by providing the proper description of the problem that you're facing along with the PBIX file for the reference as well as the mock-up results that you're trying to achieve where our members as well as experts team will be able to assist you in a better and efficient manner. Below is the link of the forum provided for the reference.
      But still we're providing few of the links of the articles from our blog posts as well as links of the videos from our Enterprise DNA TH-cam channel pertaining to this topic that might help you in your scenario.
      Hoping you find this useful and helpful. Also, make sure that you're subscribed to our TH-cam channel so that you don't miss out on any updates pertaining to the Power BI. You can also join our Power BI group on LinkedIn to receive latest updates on Power BI. Below are the links provided for the reference purposes.
      Cheers,
      Enterprise DNA
      forum.enterprisedna.co/
      th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html
      www.linkedin.com/groups/12004506/
      blog.enterprisedna.co/data-segmentation-based-on-percentage-groups-advanced-dax-in-power-bi/
      blog.enterprisedna.co/segment-your-customers-into-groups-advanced-dax-example/
      blog.enterprisedna.co/power-bi-dynamic-grouping-banding-using-dax/
      blog.enterprisedna.co/power-bi-customer-segmentation-showcasing-group-movement-through-time/
      blog.enterprisedna.co/data-segmentation-techniques-based-on-any-measure-advanced-dax/
      blog.enterprisedna.co/segment-customers-based-on-historical-performance/
      blog.enterprisedna.co/power-bi-banding-segmenting-example-using-dax/
      th-cam.com/video/DxQX6K8L6hU/w-d-xo.html
      th-cam.com/video/QhUBmO14u0o/w-d-xo.html
      th-cam.com/video/djLX6IUWVwY/w-d-xo.html
      th-cam.com/video/jLloQ_1KiGI/w-d-xo.html
      th-cam.com/video/3BlTXhhbOro/w-d-xo.html

  • @KA-rk9to
    @KA-rk9to 4 ปีที่แล้ว

    Hi Sam, It puzzles me that you can get away with >= min. Wouldn't that create overlapping segments and thus possibly false positives ? It's probably just me, but could you please explain why >= is the correct operator for the minimum segment value?

    • @EnterpriseDNA
      @EnterpriseDNA  4 ปีที่แล้ว

      Hello K A,
      thank you for posting your query onto our channel.
      The reason behind the selection of the >= operator is that for each criteria i.e. Low, Medium and High we have two intervals i.e. Min and Max.
      Now, for Low we've intervals 0.3 to 0.36 and for Mid we've 0.36 to 0.38. So now, for Low, the range will itself start from 0.3 and will end at 0.35 and for Mid the range will start from 0.36 to 0.38.
      Let's we don't use the = operator then the range for Low would have been 0.31 to 0.35 and for Mid the range would have been from 0.371 to 0.379 which is technically incorrect because then the correct figures of Total Profits will not be shown for the ranges that we've skipped by one decimal point. And therefore, we're using the >= operator for Min.
      Now, if we use the >= and = or = operator is being used in the given video.🙂
      For furthermore queries, you can write to us on our Community Forum where our members and experts team will be able to assist you in a better and efficient manner. Below is the link provided of the forum for the reference.
      Happy Learning!!!
      forum.enterprisedna.co/

  • @ardenzhuo9351
    @ardenzhuo9351 2 ปีที่แล้ว

    I still dont get the test of countrow > 0, why do we need this?

    • @EnterpriseDNA
      @EnterpriseDNA  2 ปีที่แล้ว

      Hi Arden,
      Thank you for posting your query onto our channel. We really appreciate you taking your valuable time to post it.
      We're providing couple of links below of the post which has been created by our Expert wherein it covers the explanation about why it's being used which will help you in understanding the logic or concept.
      For furthermore queries, you can also reach out to us onto our Community Forum where our members as well as experts team will be able to assist you in a better and efficient manner. Below is the link of the forum provided for the reference as well.
      Hoping you find this useful. Also, make sure that you're subscribed to our TH-cam channel so that you don't miss out on any updates pertaining to the Power BI. You can also join our Power BI group on LinkedIn to receive latest updates on Power BI. Below are the links provided for the reference purposes.
      Cheers,
      Enterprise DNA
      forum.enterprisedna.co/
      th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html
      www.linkedin.com/groups/12004506/
      forum.enterprisedna.co/t/dynamic-grouping/8463
      forum.enterprisedna.co/t/cumulative-total-group-based/11334

  • @brijahuja9028
    @brijahuja9028 4 ปีที่แล้ว

    I want video of sales amount divide by sales qty

  • @stevennye5075
    @stevennye5075 5 ปีที่แล้ว +1

    very nice

  • @alpakdeniz3989
    @alpakdeniz3989 7 ปีที่แล้ว

    Hi Sam, love the videos and Power BI. Just out of curiosity, what are some of the sites/books you used to help you get a better understanding of DAX? - Alp

    • @EnterpriseDNA
      @EnterpriseDNA  7 ปีที่แล้ว +3

      I learnt from team at SQLBI, Matt Allington & Rob Collie (they all have sites and books). Then just practice, practice, practice and I've found my own techniques along the way by combining ideas from them and others.

  • @kingingway3308
    @kingingway3308 5 ปีที่แล้ว +1

    Cool!

  • @fernandocamargo2637
    @fernandocamargo2637 5 ปีที่แล้ว

    Hi Sam, you should have a way to donate to you. I know you sell the courses but sometimes we can be grateful for your free tips and make some donation, I would be happy to do that as I have learned a lot from you. PayPal way to donate would be easy way.
    Tks again!

    • @EnterpriseDNA
      @EnterpriseDNA  5 ปีที่แล้ว

      Thanks, appreciate the feedback. We just want to keep things simple so we just have the upgraded courses or membership