Forum Discussion
pamsardinha
3 years agoFrequent Visitor
EOMONTH not returning some values
Hi! I have two measures I created to calculate the difference of Saldo between months. First one is calculating the saldo of end of month: SaldoEOM =
VAR Latest_Date = MAX('Table1'[Date...
Ashish_Mathur
3 years agoSuper User
Hi,
Try this approach
- Create a Calendar Table with calculated column formulas for Year, Month name and Month number. Sort the Month name by the Month number
- Create a relationship (Many to One and Single) from the Date column of Table1 to the Date column of the Calendar Table
- To your visual, drag Year and Month name from the Calendar Table
- Write these measures
Total = sum('Table1'[Saldo])
Total in pm = calculate([total],previousmonth(calendar[date]))
Variance = [Total in pm]-[Total]
Hope this helps.
- pamsardinha3 years agoFrequent Visitor
Hi Ashish_Mathur
Thank you for your reply. Unfortunately I cannot create Calendar table as I am working with PowerBI datasets and I do not have the rights to create them.
In any case, I appreciate your input, but if you have any other suggestions, that will be awesome as well.
Thank you,
Pamela.