Global Power BI User Group

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
Expand all | Collapse all


  • 1.  MTD vs SPLY

    Posted Oct 21, 2019 04:12 AM
    I have data for October last year for daywise sales per brand and also the current month daywise sales per brand. Am trying to write a DAX that will show brand performance VS SPLY.
    For MTD Sales, this is the DAX have  used :

    MTD Sales = CALCULATE([Total beer sales],DATESMTD(Dates[Date]))

    For SPLY Sales, the DAX have used for now is just giving an average but I want the exact sales.
    SPLY Sales = CALCULATE([Total beer sales],SAMEPERIODLASTYEAR(Dates[Date].[Date]))*DAY(TODAY())/31

    The issue
    ..i.e if today is 21st Oct 2019, the above DAX is giving me the correct sales. Now i would like to get sales as at 21st Oct 2018. N.B All sales are in the same table.

    Financial Analyst|CHFI|CISA

  • 2.  RE: MTD vs SPLY

    Top Contributor
    Posted Oct 22, 2019 05:29 AM

    Can you please explain in the measure SPLY Sales why are you dividing by ​DAY(TODAY())/31?

    As per your question, that measure is giving you the sale of that particular day, so why divide it by DAY(TODAY())/31.
    Ithink that, f you are looking for the exact sale of that day, then you should remove that part.

    Now if you want to calculate the average using the SPLY sales, then you should replace the measure [Total Beer Sales] by MTD sales and then divide it by DAY(TODAY())/31.

    Please let me know if I am missing anything here and kindly share some example of the calculation that you are looking for.

    Thank you,

    Vishesh Jain
    VR Construction