Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Simple PowerBI YOY sheet

Hello - can someone take a look at this power bi sheet Powerbi sheet link

: - I only have 4 test rows - just trying to calculate out previous year and YOY Growth.  I seem to be getting the same count for current year as previous year - resulting in 0% growth.

 

Thanks!

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Your relationship between your two tables is not correct at all. In fact, in your circumstance you don't need a date table at all.

     

    PrevYearClicks = 
    VAR myYear = MAX([Year])
    VAR myVertical = MAX([Vertical])
    RETURN CALCULATE([TotalClicks], FILTER(ALL(yoytemp),VALUE(yoytemp[Year])=VALUE(myYear)-1&&yoytemp[Vertical]=myVertical))
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for your response. I am getting an error on this saying cannot convert the HomeGarden (vertical) text to type number.  I just created this small sample as in future I will have other fields in file to aggregate on (vertical, device type...etc).  So don't want to hard copy in vertical?  I may have more than one year, etc    Previously I was following along some DAX commands on line to do this.   I see there are quick measure calculations built in the desktop app but those don't seem to work either.

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Strange, I actually created that in your PBIX. Shoot me your email in a private message and I'll mail your PBIX back to you.