Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Weeknumber and Month in Clustered Column Chart

Hi Everyone. 

Good day! So I made this calculation wherein data are calculated on a current week vs previous week and it is currently reflected with no problem when I put it in the table. I also want to show this on a clustered column chart with Month as the slicer but the numbers on the 1st and last week numbers of the month are not showing the same. I'm thinking this is because the weeks numbers are overlapping with the previous and next month. How will I be able to solve this? Thank you!

 

 

 

  • Hi Anonymous ,

     

    As you said, the MEASURE created does not apply when based on MONTH (e.g. the first three days of the week are in the previous month and the last four days are in the current month).
    So my suggestion is to recreate the two measures to show this result.

    Amount_filter = sum(FactInternetSales[SalesAmount])
    last_month = CALCULATE([Amount_filter],DATEADD(M_DimDate[Date],-1,MONTH))
    Re = 
    var Pervious = [last_month]
    var diff = [Amount_filter]-Pervious
    return DIVIDE(diff,Pervious,blank())

     


    If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.


    Best Regards,
    Henry


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

1 Reply

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    As you said, the MEASURE created does not apply when based on MONTH (e.g. the first three days of the week are in the previous month and the last four days are in the current month).
    So my suggestion is to recreate the two measures to show this result.

    Amount_filter = sum(FactInternetSales[SalesAmount])
    last_month = CALCULATE([Amount_filter],DATEADD(M_DimDate[Date],-1,MONTH))
    Re = 
    var Pervious = [last_month]
    var diff = [Amount_filter]-Pervious
    return DIVIDE(diff,Pervious,blank())

     


    If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.


    Best Regards,
    Henry


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