Forum Discussion
Line Chart: Not showing Line when Zero
- 6 years ago
Hi Anonymous ,
It caused by brackets. Try this.
Actual Cumulative Adj = IF ( CALCULATE ( SUM ( 'Fact Summary'[YTD Actuals] ), FILTER ( ALLSELECTED ( 'DimDate'[FIN_YR_MONTH] ), ISONORAFTER ( 'DimDate'[FIN_YR_MONTH], MAX ( 'DimDate'[FIN_YR_MONTH] ), DESC ) ) ) = 0, BLANK (), CALCULATE ( SUM ( 'Fact Summary'[YTD Actuals] ), FILTER ( ALLSELECTED ( 'DimDate'[FIN_YR_MONTH] ), ISONORAFTER ( 'DimDate'[FIN_YR_MONTH], MAX ( 'DimDate'[FIN_YR_MONTH] ), DESC ) ) ) )Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 6 years ago
Hi Anonymous ,
Try putting your previous formula in VAR
Actual Cumulative Adj = VAR ActualCumAdj = CALCULATE( SUM('Fact Summary'[YTD Actuals]), FILTER( ALLSELECTED('DimDate'[FIN_YR_MONTH]), ISONORAFTER('DimDate'[FIN_YR_MONTH], MAX('DimDate'[FIN_YR_MONTH]), DESC) ) ) RETURN if( ActualCumAdj = 0, BLANK(), ActualCumAdj)also, the reason of the error is that you missed one ")".
You missed to close the calculate code before putting =0.
You can easily trace it if you will organise your formula with correct spaces and br
- Anonymous6 years ago
I finally had a chance to try your solution out. It works. Awesome.
Please try creating a measure like below. This will return blank, if Line Measure has value 0 else value. Then use this measure in Line Chart.
Measure 5 = if(sum('Table (3)'[Column2]) = 0,blank(),sum('Table (3)'[Column2]))Thanks
Ankit Jain
Do Mark it as solution if the response resolved your problem. Do like the response if it seems good and helpful.
It really helped, thank you very much!