4 Replies Latest reply: Mar 28, 2016 2:30 PM by Sangram Reddy RSS

    current week vs previous week ?

    gaurav gopale

      hi,

       

      I want to show current week and previous week bar in bar chart

       

      I wrote the following expression

       

      Current Week : sum({$<Date={'>=$(=Date(WeekStart(Max(Date)),'DD/MM/YYYY'))<=$(=Date(WeekEnd(Max(Date)),'DD/MM/YYYY'))'}>}[Order Value])

       

      Previous Week: sum({$<Date={'>=$(=Date(WeekStart(Max(Date),-1),'DD/MM/YYYY'))<=$(=Date(WeekEnd(Max(Date),-1),'DD/MM/YYYY'))'}>}[Order Value])

       

       

       

      but the weekstart() function which i have used starts the week from Sunday to Saturday

       

      I want the week to start from Monday to Sunday

       

      So the expression which i have wrote gives me the wrong output

       

       

      can anyone help me

       

       

      thanks in advance