Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

dax

i want to show last year sales, this yar sales from total sales but according to the fiscal year that is already created in the database (eg 22-23, 23-24) ...... i have tried different measures but its not matching this fiscal year. Also can i display Yoy percentage with this this fiscal year ?

  • Ahmedx's avatar
    Ahmedx
    2 years ago

    explain how these numbers got it

    Categorylast year salesthis year

    Aircare10945577,4911584772,68
  • you need to write the following

    AMO = SUM('share data 1'[Sum of Retailing]) 
    lastYear = CALCULATE([AMO],'share data 1'[Fiscal] ="22-23")
    NowYear = CALCULATE([AMO],'share data 1'[Fiscal] ="23-24")
    % growth = DIVIDE([NowYear],[lastYear])-1

6 Replies

  • Share some data to work with (in a format the can be pasted in an MS Excel file) and show the expected result

      • Ahmedx's avatar
        Ahmedx
        Super User

        in a format the can be pasted in an MS Excel file or pbix

    • Anonymous's avatar
      Anonymous
      Not applicable
      last year sales = CALCULATE(SUM(PSR[Retailing]),SAMEPERIODLASTYEAR('Dates'[Dates].[Date]))
      i have used this one but its not showing same result
       
  • you need to write the following

    AMO = SUM('share data 1'[Sum of Retailing]) 
    lastYear = CALCULATE([AMO],'share data 1'[Fiscal] ="22-23")
    NowYear = CALCULATE([AMO],'share data 1'[Fiscal] ="23-24")
    % growth = DIVIDE([NowYear],[lastYear])-1