Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Week on Week Percentage Change in chart

Dear Powerbi Gods,   I new to powerbi and am trying to come out with weekly percentage changes over the week of the year but was unable to find any materials on this.   My database is as appended...
  • v-jingzhang's avatar
    4 years ago

    Hi Anonymous 

     

    If your [Total Visit] should be the number of visits in a week, and [Customer Paid per Visit] should be the number of paid visits in the same week, you could try below measures. Let me know if I misunderstood it.  

    Total Visit = COUNT('Table'[Index])
    Paid Visit = COUNTROWS(FILTER('Table','Table'[Customer Paid]="Yes"))
    Week Change = DIVIDE([Paid Visit],[Total Visit])
    This Week % change = 
    var _thisWeek = WEEKNUM(MAX('Table'[Date of Visit]),21)
    return
    CALCULATE([Week Change],'Date'[Week of Year]=_thisWeek)
    Last Week % change = 
    var _lastWeek = WEEKNUM(MAX('Table'[Date of Visit])-7,21)
    return
    CALCULATE([Week Change],'Date'[Week of Year]=_lastWeek)

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.