Forum Discussion
Quick Measure time over time comparison showing future dates
- 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
Hi danextian
What you would need to do is to create a new measure, which will evaluate if the measure is blank and if so make the output blank otherwise display the values.
Example:
- Your current measure is called "Year on Year Comp"
- New measure would be
New Year on Year = IF(ISBLANK([Year on Year Comp]),BLANK(),[Year on Year Comp]))
- That will then not display anything for April
@i GilbertQ, i tried your approach but still not working.
by the way im doing an MoM %
Using Power BI's quick measure feature, I created a mon over month % change.
- GilbertQ9 years agoSuper User
Hi danextian
Ok possibly change the ISBLANK measure not to the calculated measure but the SUM measure that you are using
In your example it will be the [Value] to replace
- danextian9 years agoSuper User
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-msft9 years agoMicrosoft Employee
Hi 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