Forum Discussion
PREVIOUSMONTH
Good morning,
I have a problem with a PREVIOUSMONTH "mesure".
I use this:
And returns me this:
Can someone help me?
Thanks a lot.
9 Replies
- mh2587Super User
PREVIOUSMONTH(DISTINCT(Oportunidades[Fecha de creación])))
use DISTINCT function hope it will helps you
- mariases94Helper III
- mh2587Super User
Hi create date table with single of date then relate date column with Oportunidades
- amitchandakSuper User
mariases94 , please use date table and mark that as date table
PREV_MONTH_abiertas = CALCULATE(Oportunidades[COUNT_MARIA_OPO_ABIERTAS],PREVIOUSMONTH('Date'[Fecha]))
assuming COUNT_MARIA_OPO_ABIERTAS is a measure
Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw
- mariases94Helper III
Hi amitchandak ,
I put your formula and returns me a "blank":
PREV_MONTH_abiertas = CALCULATE(Oportunidades[COUNT_MARIA_OPO_ABIERTAS],PREVIOUSMONTH('CALENDAR'[Date]))In all date columns, I put date format. I don't know where is the error.
Thanks a lot!
- amitchandakSuper User
mariases94 , have you selected any date on page(slicer or filter) , because if that is not there, then it will take first date as reference for last month and you will not get value
refer
Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw