Forum Discussion

GPrice508's avatar
GPrice508
New Member
1 year ago
Solved

Calculating Year-over-Year without a Date table

I'm struggling with generating YoY measures since we don't capture actual dates --- we only capture Year.  So for this project I have: Ind = Count of Individuals that participated in a program Prog...
  • FBergamaschi's avatar
    1 year ago

    A couple of things

     

    1 - this is a DAX question, please cancel the post and repost it here

     

    https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/bd-p/DAXCommands

     

    2 - please enrich your post as it is impossible to answer it as it is. You need to specify the tables you have, how they are connected and the issue (what do you mean "we only capture only year?")

     

    Otherwise the answer is simply this measure

    TotalInd =  SUM (Table[Ind])

     

    YoY Delta Pct = 
    VAR TotalIndVAR = [TotalInd]
    VAR TotalIndPrevYearVAR = CALCULATE ( [TotalInd], SAMEPERIODLASTYEAR ( 'Date'[Date] )

    RETURN
    DIVIDE ( TotalINdVAR-TotalIndPrevYearVAR, TotalIndPrevYearVAR )


    Assuming you have a Calendar table, otherwise create it

     

    Date = CALENDARAUTO()

     

    There is no time intelligence without a date table, so please create it

     

    PLEASE REPOST in the DAX section before replying, this is NOT the right place for this question

     

    If this helped, please consider giving kudos and mark as a solution

    mein replies or I'll lose your thread

    consider voting this Power BI idea

    Francesco Bergamaschi

    MBA, M.Eng, M.Econ, Professor of BI