When And How To Use The EARLIER Function In Power BI - DAX Concepts

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ต.ค. 2024
  • In this particular tutorial I dive into one of the more advanced functions in the entire DAX language. EARLIER is a relatively difficult function to grasp. The reason for this is because it requires you to have a deep understanding of the concept of context.
    Sometimes within one DAX formula you can actually have multiple contexts working away to gather what's required to find the ultimate calculated result.
    Essentially EARLIER allows you to jump from one particular context to another, within a formula, to retrieve a certain value that's required for your calculation.
    The best way to explain it is certainly through this video tutorial which is a lengthy one to really dive into the nuances of this particular function.
    **** Video Details ****
    5:08 - calculating cumulative product sales
    5:49 - calculating if product index is less than or equal to 8
    8:40 - creating cumulative total based on ranking
    9:32 - using variables to calculate cumulative product sales
    **** Learning Power BI? ****
    FREE COURSE - Ultimate Beginners Guide To Power BI - portal.enterpri...
    FREE COURSE - Ultimate Beginners Guide To DAX - portal.enterpri...
    FREE - 60 Page DAX Reference Guide Download - enterprisedna....
    FREE - Power BI Resources - enterprisedna....
    Enterprise DNA Membership - enterprisedna....
    Enterprise DNA Online - portal.enterpri...
    Enterprise DNA Events - enterprisedna....
    **** Related Links ****
    Simple Filters w/CALCULATE - Ultimate Beginners Guide to DAX - • Simple Filters w/CALCU...
    How To Calculate Budget Or Forecast Results Cumulatively In Power BI - blog.enterpris...
    Compare Multiple Metrics Cumulatively in Power BI using DAX - blog.enterpris...
    **** Related Course Modules ****
    Mastering DAX Calculations - portal.enterpri...
    Solving Analytical Scenarios w/Power BI & DAX - portal.enterpri...
    Financial Reporting w/Power BI - portal.enterpri...
    **** Related Support Forum Posts ****
    Cumulative Total Vs Cumulative Total LY - Cleaning Visual - forum.enterpri...
    Cumulative Total Question - forum.enterpri...
    Cumulative Total This Year vs Last - forum.enterpri...
    For more cumulative total support queries to review see here…. - forum.enterpri...

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

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

    ***** 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 *****
    Simple Filters w/CALCULATE - Ultimate Beginners Guide to DAX - th-cam.com/video/awpvBSiJhAg/w-d-xo.html
    How To Calculate Budget Or Forecast Results Cumulatively In Power BI - blog.enterprisedna.co/2018/08/07/showcasing-budgets-cummulatively-in-power-bi-advanced-dax-formula/
    Compare Multiple Metrics Cumulatively in Power BI using DAX - blog.enterprisedna.co/2017/12/04/compare-multiple-metrics-cumulatively-in-power-bi-using-dax/
    ***** Related Course Modules *****
    Mastering DAX Calculations - portal.enterprisedna.co/p/mastering-dax-calculations
    Solving Analytical Scenarios w/Power BI & DAX - portal.enterprisedna.co/p/solving-business-scenarios-with-power-bi-and-dax
    Financial Reporting w/Power BI - portal.enterprisedna.co/p/financial-reporting-power-bi
    ***** Related Support Forum Posts *****
    Cumulative Total Vs Cumulative Total LY - Cleaning Visual - forum.enterprisedna.co/t/cumulative-total-vs-cumulative-total-ly-cleaning-visual/116
    Cumulative Total Question - forum.enterprisedna.co/t/cumulative-total-question/1054
    Cumulative Total This Year vs Last - forum.enterprisedna.co/t/cumulative-total-this-year-vs-last/2713
    For more cumulative total support queries to review see here…. - forum.enterprisedna.co/search?q=cumulative%20total

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

    Awesome Tutorial! I've struggled for a few weeks to understand EARLIER until I came across your tutorial today and it was a Eureka moment. Thanks very much - I finally understand it!

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

    This is great! I was just thinking about EARLIER-function and was also wondering about the VARIABLE-fuzz, but this video cleared the picture. Thank you Sam! I now know, that I can initiate calculation with a variable; isolate calculation with variables in it and carry it out seamlessly without jumpung in and out of the formula context.

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

    WONDERFUL! I have to use it to apply a Pitagoras in order to calculate distance between two GPS points.

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

    Excellent tutorial Sam! Thank you.

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

    Thank you Sam! Great explanation!

  • @jaimansourimohammedamine5395
    @jaimansourimohammedamine5395 8 หลายเดือนก่อน

    Hello,
    I appreciate the quality of your videos and commend you for the clarity of your explanations. I'm wondering if it's possible to apply the "Earlier" function in a DAX measure for calculating the cumulative total of revenue by product category, for instance.

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

    been looking for this vid for ever! thank you so much for doing this

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

      Hi Jorge Eduardo, 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: th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html

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

    I just had my mind blown! Thank you so much!

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

      Hi Giorgiy Kiladze, 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

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

    I like this a lot Thank you!

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

      Hi Antony Santiago, 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

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

    Great!

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

    Prior to Variables, how would you do a cumulative total measure?

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

      Hello William Arthur,
      Thank you for posting your query onto our channel. We really appreciate you taking your valuable time to post it.
      Prior to the invention of variables, we were using the function called "EARLIER()" but it's not used much now-a-days due to the performance issues unless and until required. Below is the link of that function provided for the reference.
      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! You can subscribe to our TH-cam 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/
      th-cam.com/channels/y2rBgj4M1tzK-urTZ28zcA.html
      www.linkedin.com/groups/12004506/
      learn.microsoft.com/en-us/dax/earlier-function-dax

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

    is it possible that the variables no longer can hold a column value, only measures?? because i've been trying using a variable to store the value of a category, but power bi says it is the wrong type.

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

      Hi Mariam Khalid, thanks for your interest in our TH-cam videos.
      Variable does allow to use Column Name for creating calculating Column however if you are trying to use inside a Measure Variable will expect single value or a Table. For example, It will allow to use max(dates[date]) but not dates[date].
      If you are creating a Calculated Column and still facing issues, please raise a Ticket at EDNA Forum forum.enterprisedna.co/.

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

    Thanks for sharing.
    It is possible to do the Cumulative Product Sales by Product Category?

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

      Yes should be. You would just need to adjust the parameters around within the formula for that.

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

      @@EnterpriseDNA How would you apply this formula to Number of Days Since Last Visit against Customer ID and Visit Date columns?

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

    can you show how you meassuare your Total Sales?

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

      Hi, Total Sales have beend discussed several times in the Enterprise DNA forum. You can check the link below:
      forum.enterprisedna.co/search?expanded=true&q=total%20sales