SUM vs SUMX What's The Real Difference Between These DAX Measures

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 53

  • @EnterpriseDNA
    @EnterpriseDNA  4 года назад

    ***** Learning Power BI? *****
    FREE COURSE - Ultimate Beginners Guide To Power BI - portal.enterprisedna.co/p/ultimate-beginners-guide-to-power-bi
    FREE COURSE - Ultimate Beginners Guide To DAX - portal.enterprisedna.co/p/ultimate-beginners-guide-to-dax
    FREE - 60 Page DAX Reference Guide Download - enterprisedna.co/dax-formula-reference-guide-download
    FREE - Power BI Resources - enterprisedna.co/power-bi-resources
    Enterprise DNA Membership - enterprisedna.co/membership
    Enterprise DNA Online - portal.enterprisedna.co/
    Enterprise DNA Events - enterprisedna.co/enterprise-dna-events-page/
    ***** Related Links *****
    Working With Iterating Functions In DAX - blog.enterprisedna.co/working-with-iterating-functions-in-dax/
    Using Iterating Functions SUMX And AVERAGEX In Power BI - blog.enterprisedna.co/using-iterating-functions-sumx-and-averagex-in-power-bi/
    Power BI Data Model For Advanced Scenario Analysis Using DAX - blog.enterprisedna.co/advanced-scenario-analysis-techniques-for-power-bi-wdax/
    ***** Related Course Modules *****
    DAX Formula Deep Dives - portal.enterprisedna.co/p/dax-formula-deep-dives
    Mastering DAX Calculations - portal.enterprisedna.co/p/mastering-dax-calculations
    Advanced DAX Combinations - portal.enterprisedna.co/p/advanced-dax-combinations
    ***** Related Support Forum Posts *****
    SUMX Vs Row By Row Multiplication - forum.enterprisedna.co/t/sumx-vs-row-by-row-multiplication/5645
    Financial Templates Vs Last Year Make Same Period - forum.enterprisedna.co/t/financial-templates-vslastyear-make-sameperiod/2214/14
    Removing Context From SUMMARIZE - forum.enterprisedna.co/t/removing-context-from-summarize/4674
    For more SUM vs SUMX support queries to review see here - forum.enterprisedna.co/search?q=SUM%20vs%20SUMX

  • @tungacta
    @tungacta 4 года назад +18

    Sam, you do a terrific job in explaining the "technical difference", however, in order to understand the "real world" difference, you should also include examples of a few other more powerful features of SUMX. Because, at the end of this particular tutorial, I thought to myself, "oh Ok, so instead of having a Column that is the product of 2 other columns, I could just do this with a measurement SUMX. You demonstrated what could be done with both SUM and SUMX. You did not show, more importantly, What cannot be done with SUM that is possible with the "iterating Engine" utilized with SUMX. Magic here is the Expression option.

  • @HueMannKind
    @HueMannKind Год назад +1

    Awesome awesome job. This has confused me for a long time, and here's the answer in 7 1/2 minutes!

    • @EnterpriseDNA
      @EnterpriseDNA  Год назад

      Hi Caleb, glad that this video is of help! If you haven't yet, you can subscribe to our channel to see all our upcoming Power BI and Power Platform video tutorials and announcements. Cheers!

  • @midwest042003
    @midwest042003 10 месяцев назад

    Great job! What if you have to multiply two columns from
    different tables

  • @SG-pf1vn
    @SG-pf1vn 4 года назад +6

    This is such a great explanation, would've have been so helpful to me long ago when I started with DAX. I remember one more example I was given though that really cleared things up for me which would be great in this video, contrast this example with one where it's not possible to achieve the result that is typically desired with both functions SUM and SUMX (albeit in this case it with the presence of the revenue data in the physical table) something like a percentage value in a physical column where it will never make sense to add percentages, hence a situation where if you had the percentages in a table for each row (cause that's what you were given for whatever reason) and you wanted a measure to give you a percentage for an aggregate of the two columns that were used to calculate the percentage (assuming they're in the data set) you would have to use Sum to get a result that makes sense. Someone showed me that as an example at one point and I remember that it really clarified completely for me anyway.

    • @JC-bx1vt
      @JC-bx1vt 4 года назад +1

      I don't understand your example. If you had the columns that were used to calculate the percentage by row, then you could just use SUM, right? For example, say you wanted an aggregate Percent Profit. You've already got a column called PercentProfit, which is Profit divided Revenue for each row. You'd just use SUM to get your aggregate measure:
      Measure = divide(sum(Profit),sum(Revenue),0)
      What am I missing?

    • @tungacta
      @tungacta 4 года назад

      Exactly! Sorry, I wrote my comment before reading yours....

    • @SG-pf1vn
      @SG-pf1vn 4 года назад

      @@JC-bx1vt nothing wrong with that, that'll work too, this however and variations of the basic calculation can also be done with sumx, which is what I was making reference too. Maybe my example not the best as it can be done with a combination of sum and divide.

  • @CFenghuang7
    @CFenghuang7 2 года назад +1

    Thank you!
    Is it possible to have this calculation done between different tables?
    I have a table "ShipHistory" with material number and ship Qty, and a Master Data table with material number and different types of cost per unit.
    I could merge both of the tables then do the Sumx, but I was hoping there is a simpler way to just pull data from different tables and calculate it.

    • @EnterpriseDNA
      @EnterpriseDNA  2 года назад

      Hi shifeng li,
      Thank you for posting your query onto our channel. We really appreciate you taking your valuable 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.
      Hoping you find this useful! You can subscribe to our RUclips channel so that you won't miss out on any Power BI updates. You can also join our LinkedIn group to receive latest updates on Power BI.
      Cheers,
      Enterprise DNA
      forum.enterprisedna.co/
      ruclips.net/channel/UCy2rBgj4M1tzK-urTZ28zcA
      www.linkedin.com/groups/12004506/

  • @ek_setera
    @ek_setera Год назад +1

    This is amazing! Thank you!

    • @EnterpriseDNA
      @EnterpriseDNA  Год назад

      Hi @ek_setera, glad that you appreciated our content! If you haven't yet, you can subscribe to our channel to see all our upcoming data skills and AI tutorials, and announcements. Cheers!

  • @vedsoh
    @vedsoh 4 года назад +1

    is there a differenceX too? I want to find difference between creation date and completion date for all the inputs and wanted to do it with measures instead of simply doing it with custom column.

  • @vinodjadhav7334
    @vinodjadhav7334 4 года назад +2

    Hi sir.Where i can find these data sources.

  • @simonsaruggia
    @simonsaruggia Год назад +1

    This is awesome! thank you

    • @EnterpriseDNA
      @EnterpriseDNA  Год назад

      Hi Simone, glad that you appreciated our content! If you haven't yet, you can subscribe to our channel to see all our upcoming tutorials and announcements. Cheers!

  • @Renatofsa355
    @Renatofsa355 2 года назад +1

    Awesome explanation

    • @EnterpriseDNA
      @EnterpriseDNA  2 года назад

      Hi Renato, glad that you appreciated our content! If you haven't yet, you can subscribe to our channel to see all our upcoming Power BI video tutorials and announcements. Cheers!

  • @PeachBeef
    @PeachBeef 4 года назад +1

    Fantastic clarification

  • @mohammadrizeg
    @mohammadrizeg 2 года назад

    Great efforts to educate us carefully, thanks alot, Sam.

    • @EnterpriseDNA
      @EnterpriseDNA  2 года назад +1

      Hi Mohammed, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials. Cheers!

  • @cblondhe
    @cblondhe 2 года назад

    Well Explained. Thanks

    • @EnterpriseDNA
      @EnterpriseDNA  2 года назад

      Hi Chandra, glad that you appreciated our content! If you haven't yet, you can subscribe to our channel to see all our upcoming Power BI video tutorials and announcements. Cheers!

  • @henrytnh1
    @henrytnh1 3 года назад

    Many thanks. Very articulate explanation.

    • @EnterpriseDNA
      @EnterpriseDNA  3 года назад

      Hi Henry Tnh, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials.
      Here’s the link: ruclips.net/channel/UCy2rBgj4M1tzK-urTZ28zcA

  • @chavelooo33
    @chavelooo33 4 года назад

    Thank you very much, I like you method. Simple and straight to the point.

    • @EnterpriseDNA
      @EnterpriseDNA  4 года назад

      Glad you liked it! Please dont forget to subscribe to our channel :)

  • @davidh5573
    @davidh5573 4 года назад

    Made sense when you explained it!! Thank you!!

    • @EnterpriseDNA
      @EnterpriseDNA  4 года назад

      Hi David H, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials. Here’s the link: ruclips.net/channel/UCy2rBgj4M1tzK-urTZ28zcA

  • @thaismachado6600
    @thaismachado6600 3 года назад

    Now I got it! Thanks

    • @EnterpriseDNA
      @EnterpriseDNA  3 года назад

      Hi Thais Machado, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials.
      Here’s the link: ruclips.net/channel/UCy2rBgj4M1tzK-urTZ28zcA

  • @Devloper56
    @Devloper56 2 года назад

    Thank you !!!!!!!!!

    • @EnterpriseDNA
      @EnterpriseDNA  2 года назад

      Hi Kunjal, glad that you appreciated our content! If you haven't yet, you can subscribe to our channel to see all our upcoming Power BI and Power Platform video tutorials and announcements. Cheers!

  • @wexwexexort
    @wexwexexort 3 года назад

    Thanks you very much.

    • @EnterpriseDNA
      @EnterpriseDNA  3 года назад

      Hi Eredin, glad that you found value in this video. You can subscribe to our channel to see all our upcoming Power BI video tutorials. Cheers!

  • @allabout1135
    @allabout1135 4 года назад

    This is really useful. Thank You!

  • @joelvazquezmarin3519
    @joelvazquezmarin3519 4 года назад

    Another very helpful video, already suscribed

  • @harveyspector8367
    @harveyspector8367 2 года назад

    Awesome!!

    • @EnterpriseDNA
      @EnterpriseDNA  2 года назад

      Hi Harvey, glad that you appreciated our content! If you haven't yet, you can subscribe to our channel to see all our upcoming Power BI video tutorials. Cheers!

  • @pranavindi7152
    @pranavindi7152 3 года назад

    thank you

    • @EnterpriseDNA
      @EnterpriseDNA  3 года назад +1

      Hi Pranav Indi, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials.
      Here’s the link: ruclips.net/channel/UCy2rBgj4M1tzK-urTZ28zcA

  • @PythonWithJoe
    @PythonWithJoe 4 года назад

    The best
    Love your work man

    • @EnterpriseDNA
      @EnterpriseDNA  4 года назад

      Hi Python With Joe, glad you appreciated the video. You can subscribe to our channel to see all our upcoming Power BI video tutorials. Here’s the link: ruclips.net/channel/UCy2rBgj4M1tzK-urTZ28zcA

  • @andreibudaes3966
    @andreibudaes3966 4 года назад +2

    don't get it. wouldn't SUM([Order Quantity]*[Unit Price]) return the same as SUMX?

    • @Randyminder
      @Randyminder 4 года назад +1

      If you tried this you would get an error because the SUM function does not generate a row context and you need a row context to access multiple fields like you are doing in your example. You can access a single column without a row context but not multiple columns.

  • @annagora6409
    @annagora6409 3 года назад

    so sumx is like sumproduct in excel...

  • @johnabram4159
    @johnabram4159 4 года назад +2

    So the SUMX = Product

  • @giri41
    @giri41 6 месяцев назад

    great view please help below code not working
    Test_1 =
    var PriceperUnit_CY = DIVIDE([Sales_CY],[Quantity_CY],0)
    var PriceperUnit_PY = DIVIDE([Sales_PY],[Quantity_PY],0)
    var SalesVariance = [Sales_CY]-[Sales_PY]
    return
    SUMX(VALUES(ATC[material_style1]),if(DIVIDE([Sales_CY],[Quantity_CY],0)=0 || DIVIDE([Sales_PY],[Quantity_PY],0)=0,[Sales_CY]-[Sales_PY],1))

  • @vasilisa6128
    @vasilisa6128 4 года назад

    Thank you! This video was helpful!

    • @EnterpriseDNA
      @EnterpriseDNA  4 года назад

      Hi Vasilisa Glushkova, great that you found value in this video. You can subscribe to our channel to see all our upcoming Power BI video tutorials. Here’s the link: ruclips.net/channel/UCy2rBgj4M1tzK-urTZ28zcA

    • @vasilisa6128
      @vasilisa6128 4 года назад

      @@EnterpriseDNA I already did)