Forum Discussion

jayceeb's avatar
jayceeb
Icon for Helper I rankHelper I
1 year ago
Solved

WEEKLY TRENDS comparison

Hi, I have daily data entry I just want to get the weekly trends comparison example my data is 

DateQuantity
1-Jan1
2-Jan1
3-Jan1
4-Jan1
5-Jan1
6-Jan1
7-Jan1
8-Jan1
9-Jan1
10-Jan1
11-Jan1
12-Jan1
13-Jan1
14-Jan1
1-Feb2
2-Feb2
3-Feb2
4-Feb2
5-Feb2
6-Feb2
7-Feb2
8-Feb2
9-Feb2
10-Feb2
11-Feb2
12-Feb2
13-Feb2
14-Feb2

  I want my result to show like this if i select the date filter . is it possible to put it in graph as well? please help. Thank you:)

MonthWeekTotal
Jan 1-Jan 7week 17
Feb 1- Feb 7week 114
Jan 8-Jan 14week 27
Feb 8- Feb 14week 214
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi jayceeb ,

    In Power BI Desktop, if you want to use a DAX statement after selecting a date, you need to strictly follow the Week rule on the calendar to do so. 

    WeeklyTotal = 
    CALCULATE(
        [TotalQuantity],
        ALLEXCEPT('Table', 'Table'[MonthYear], 'Table'[WeekNumber])
    )

     

     

    Best Regards

    Yilong Zhou

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies