Forum Discussion
chlimaye
1 year agoRegular Visitor
Currenmonth and Previous Month values along with comments
Hi , I have created one table which Market, Brand, Sub-Month , Volume , Curre- PreviousMonth Diff, Comments. In data model i am havign two table one is DVMI and other DVMIBC with comments. T...
Anonymous
1 year agoNot applicable
Hi chlimaye ,
I suggest you to create a dimdate table with continuous date and then use datetime intelligence function:
PREVIOUSMONTH().
submissionDate = ADDCOLUMNS(CALENDAR(DATE(2024,1,01),DATE(2024,12,31)),"Sub Month",FORMAT([Date],"YYYY-MM"),"YearMonth",YEAR([Date])*100 + MONTH([Date]))
Relationship:
Measures:
M_Volume = CALCULATE(SUM('Table'[Volume]))Previous Volume = CALCULATE([M_Volume],PREVIOUSMONTH(submissionDate[Date]))Curre- PreviousMonth Diff = [M_Volume] - [Previous Volume]
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
chlimaye
1 year agoRegular Visitor
it giving me same output.