Forum Discussion
Get previous month's value
Hi all,
I know this topic has probably been discussed a hundred times or more, but I can't seem to get a simple calculated column to work. I simply need to get the previous month's value. Below is a screenshot of the DAX and the result (blank). It's pretty straightforward, so I'm not sure what I'm missing. Any ideas? Thanks.
Update: I was creating a calculated column, not a measure. That seemed to fix it. Thanks.
3 Replies
- amitchandakSuper User
wbhite , is there in the table or selected on the page.
Because when you do select year. This month is basically the last available in the date table. That can make prior blank
Other things
Make sure calendar table is marked as date table
No time stamp in date table join
refer
Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw
Why DATESMTD is still blank, even after having correct TI Setup: https://youtu.be/j0ug-XQgZtg
Why previousmonth does not give result when datesmtd is giving it: https://youtu.be/1KkoJehRVeg
- wbhiteHelper I
Thanks for the response. My table "Calendar" is marked as a date table and there are no timestamps in the fact or Calendar table (just straight dates). I do have multiple years in the fact table but I have a filter (not shown) set to 2021.
- wbhiteHelper I
Update: I was creating a calculated column, not a measure. That seemed to fix it. Thanks.