Forum Discussion
Values from Previous month not showing
I've created a table as following.
MRRWaterFall = CALCULATETABLE(
SUMMARIZE('Calendar','Calendar'[BeginningOfMonth],"Beginning MRR",[Beginning MRR],"New MRR",[New MRR],"Expansion MRR",[Expansion MRR],"Contraction MRR","place holder","Churned MRR",[Churned MRR],"Total MRR",[Total MRR]))Everything shows excepts for Beginning MRR(which is the Total MRR of previous Month)
Here is the measure for Total MRR :
Total MRR =
CALCULATE(
SUM(MRR_Opps[MRR_NZD]),
MRR_Opps[StageName] IN {"Closed Won","PO/Contract","Payment received by SnapComms"}
)Here is the measure for Beginning MRR:
Beginning MRR =
CALCULATE(
SUM(MRR_Opps[MRR_NZD]),
MRR_Opps[StageName] IN {"Closed Won","PO/Contract","Payment received by SnapComms"},
PREVIOUSMONTH(MRR_Opps[MRR_Dates])
)
values from Beginning MRR measure works when you use it in a graph but not when you try to use it in a table as above.
How can I fix this?
- Anonymous6 years ago
I managed to solve this by creating a new column instead of using measures.
3 Replies
- edhans
Community Champion
Your dates in PREVIOUSMONTH should be from your date table that is related to your dates in the MRR_OPS table. Date Intelligence requires a true date table to reliably work.
I think there is some additional context transition going on too as when you use one measure in another, DAX wraps that measure reference in CALCULATE(), but I'd need to see your PBIX file to really dig into that.
- amitchandak
Super User
Try with date table like. Use time intelligence like datesmtd and totalmtd
MTD Sales = CALCULATE([MRR]),DATESMTD('Date'[Date])) last MTD Sales = CALCULATE([MRR]),DATESMTD(dateadd('Date'[Date],-1,MONTH))) last MTD (complete) Sales = CALCULATE([MRR]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH)))) last year MTD (complete) Sales = CALCULATE([MRR]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-12,MONTH)))) last year MTD Sales = CALCULATE([MRR]),DATESMTD(dateadd('Date'[Date],-12,MONTH))) last QTR same Month (complete) Sales = CALCULATE([MRR]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,Qtr)))) MTD (Year End) Sales = CALCULATE([MRR]),DATESMTD(ENDOFYEAR('Date'[Date]))) MTD (Last Year End) Sales = CALCULATE([MRR]),DATESMTD(ENDOFYEAR(dateadd('Date'[Date],-12,MONTH),"12/31")))To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/Does the above reply helps. if you need more help make me @
Appreciate your Kudos. - AnonymousNot applicable
I managed to solve this by creating a new column instead of using measures.