Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
1 year ago

Deflated Sales Selected Year

Please specify a measure that deflates the year selected in the filter but leaves the previous year at face value

A clear example would be that Jan. 2024 had a turnover of $1,087,822,571 but if I deflate it and take out the price increase of 353.60% I would be left with $249,901,808 with which the real growth would be 12.5%.

I wish I could replicate the value of Ene to some extent. 2024 at $249,901,808 and the value of Jan. 2023 at 222,049,649 in the same table

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi jtur ,

     

    According to your description, when the user selects the year and month in the slicer, you like to deflate the value which is corresponding to the same year and month. If my understanding is correct, you can refer to my method. Since I don't know your calculation logic of deflation, I'm using "test" as a temporary substitute. Please modify the DAX I provided as needed.

    _value = 
    VAR _selectyear = SELECTEDVALUE('Month'[Date].[Year])
    VAR _selectmonth = SELECTEDVALUE('Month'[Date].[Month])
    VAR _lastyear = CALCULATE(SUM('Table'[Value]),ALL('Table'),YEAR('Table'[Date])=YEAR(MAX('Table'[Date]))-1,MONTH('Table'[Date])=MONTH(MAX('Table'[Date])))
    VAR _check = MAX('Table'[Date].[Year])=_selectyear&&MAX('Table'[Date].[Month])=_selectmonth
    RETURN
    IF(_check,"test",MAX('Table'[Value]))
    

     

     

     

     

    Best regards,

    Mengmeng Li

  • Thank you Ming Leng

    I would need if you would be so kind of a little more of your help.

    Figure 1:

    • These would be nominal sales.
    • % Price Increases: Year-over-year increases that occurred in the price list. In this case, they are the increases in 2024 vs. the price increases in 2023
    • Net Growth: % growth at constant values (deflating the selected year 2024 vs. the nominal sales of the year 2023). As an example, in the month of January 2023 there was an 8% real growth since deflating the value of $1,087,822,571 from the invoiced value of the year 2024 where there was a price increase of 353.60% = $239,818,406 vs $222,049,649 = 8%

    Figure 2: Growth Formula

    Figure 3: Data structure

    Figure 4: I applied the formula you indicated, but it doesn't work for me

    Figure 5: Create a column in the Pbi table TOTAL INVOICED PRODUCTS where I deflated each invoiced item according to the billing date and the % year-over-year increase

    Please appreciate your help.

    Thank you!!

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi jtur ,

       

      The key to the method is to determine if the year and month of the matrix context are the ones selected in the slicer.

      Here are my suggestions for your reference.

      If above doesn't work, please provide publick link to the pbix file(doesn't include sensitive data), which will help me better investigate the issue.

       

       

      —————————————————————————————————————————————————

      If my answer helps you solve the problem, please accept my answer as a solution and let it be seen by more people in need.

      Best regards,

      Mengmeng Li