Forum Discussion
How to make Line Chart stop mid-graph for future dates
- 9 years ago
Hi Jason,
Happy to help. If this is a numerical column then you might want to try using the BLANK() function. My first thought would be to write an IF statement asking of the Date on your axis is less than or equal to today's date. If true then it would return the value from your formula, if false it would return BLANK(). So something potentially like this. Let me know if this helps or gets you closer.
=IF( Table[Date] <= TODAY(), [Formula], BLANK() )
Fantasic. Good evolution of the formula and glad you were able to find a solution.
Hi, I have managed to get my cumulative measure to stop at a particular point (Cost Period = 4) and fill the future with BLANK()
However when plotting using Line Chart the Yellow line just goes horizontal (flat line) even though values are BLANK.
Can anyone advise what I am doing wrong?
- acimisliin7 years agoRegular Visitor
Hi,
Please check this DAX measure:
Cumulative NSI = IF( MAX('Calendar'[Date]) > TODAY(), BLANK(),CALCULATE(SUM(AllBusinessSales[NSI]),FILTER(ALLSELECTED( 'Calendar' ),'Calendar'[Date] <= MAX('Calendar'[Date]))))The trick is to put BLANK() after today.