Forum Discussion
danextian
Super User
9 years agoQuick Measure time over time comparison showing future dates
Hi All, I'm not sure if I am the only one having this issue. I have a data that is only until March. When I created a quick measure, Power BI also added April but with zero values so this cre...
- 9 years ago
Hi, I am no sure what you mean.
I ended up doing this:
Value MoM% = var MaxDate = CALCULATE(max('raw data - unpivoted'[Month]),all('raw data - unpivoted'[Month])) var myValue = IF( ISFILTERED('Calendar'[Dates]), ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy"), VAR __PREV_MONTH = CALCULATE( 'raw data - unpivoted'[Value], DATEADD('Calendar'[Dates].[Date], -1, MONTH) ) RETURN DIVIDE('raw data - unpivoted'[Value] - __PREV_MONTH, __PREV_MONTH) ) RETURN IF( myvalue=-1,blank(),myValue )I added this
myvalue=-1,blank(),myValue
danextian
Super User
9 years ago
Hi, I am no sure what you mean.
I ended up doing this:
Value MoM% =
var MaxDate = CALCULATE(max('raw data - unpivoted'[Month]),all('raw data - unpivoted'[Month]))
var myValue =
IF(
ISFILTERED('Calendar'[Dates]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy"),
VAR __PREV_MONTH =
CALCULATE(
'raw data - unpivoted'[Value],
DATEADD('Calendar'[Dates].[Date], -1, MONTH)
)
RETURN
DIVIDE('raw data - unpivoted'[Value] - __PREV_MONTH, __PREV_MONTH)
)
RETURN IF(
myvalue=-1,blank(),myValue
)I added this
myvalue=-1,blank(),myValue
v-ljerr-msft
Microsoft Employee
9 years agoHi danextian,
Great to hear the problem got resolved! Could you accept your helpful reply as solution to help others who may also have the similar issue easily find the answer and close this thread? :smileyhappy:
Regards