Forum Discussion
Stacked and Line Chart - comparing both years
- 8 years ago
Hi Amelia,
Change your formula to:
YTDCumlativeOrderValue = IF ( ISBLANK ( SUM( Fact_Orders[OrderValue] )), BLANK (), TOTALYTD( SUM( Fact_Orders[OrderValue] ) , Dim_Date[DateSK]) )Should give you the expected result, another way is to have your Dim_Date to end on the current date so you won't get any date values from today onwards so on your visuals there will not be future dates.
Regards,
MFelix
MFelix yes, i belive i can add a filter to TOTALYTD but having trouble with the syntax. the ye;llow line is the current year cumulative value based on
YTDCumlativeOrderValue = TOTALYTD( SUM( Fact_Orders[OrderValue] ) , Dim_Date[DateSK])
but obviously only want it to go to the current month - september
still getting up to speed on DAX
- MFelix8 years agoSuper User
Hi Amelia,
Change your formula to:
YTDCumlativeOrderValue = IF ( ISBLANK ( SUM( Fact_Orders[OrderValue] )), BLANK (), TOTALYTD( SUM( Fact_Orders[OrderValue] ) , Dim_Date[DateSK]) )Should give you the expected result, another way is to have your Dim_Date to end on the current date so you won't get any date values from today onwards so on your visuals there will not be future dates.
Regards,
MFelix
- v-ljerr-msft8 years agoMicrosoft Employee
Hi Amelia,
Have you tried the solution provided by MFelix above? Does it work in your scenario? If it works, could you accept it as solution to close this thread?
If you still have any question on this issue, feel free to post here. :smileyhappy:
Regards