Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
aguitatierra
Contributor II
Contributor II

Remove points from line plot

I'd like to remove the points after the line. The data plotted is sum(Demanda) and the values are actually NULL for the last three months (see table below). However, when I apply sum I get zeros back. 

Any ideas highly appreciated!! 

Captura de pantalla 2023-06-23 112230.png

 

 

 

Labels (2)
7 Replies
BrunPierre
Partner - Master
Partner - Master

Hi, Try to uncheck Include zero values. In the properties panel click the Add-ons section and then click Data Handling.

aguitatierra
Contributor II
Contributor II
Author

Many thanks for your reply. Yes, I had already tried that but didn't work. 

Based on other posts (ej. https://community.qlik.com/t5/QlikView-App-Dev/Removing-data-points-from-a-chart/td-p/1148936) I've also tried with multiple expressions in the line of this one, but no luck.

sum({< FlagDemanda = {0} >} Demanda)

BrunPierre
Partner - Master
Partner - Master

Try this:

Sum({$< Demanda={"=Len(Trim([Demanda))>0"} >} Demanda)

aguitatierra
Contributor II
Contributor II
Author

Hi, thanks! Yes, it works when I only have one line, but I actually have two. When I introduce the second one, values get plotted even though there is no data for Reales... I have unchecked "Include zero values".

ConEsperados.pngSinEsperados.png

BrunPierre
Partner - Master
Partner - Master

Do the same for the other expression. i.e.

Sum({$< Reales={"=Len(Trim([Reales))>0"} >} Reales)

aguitatierra
Contributor II
Contributor II
Author

I've tried, but no success (see image below).

  • Reales = Sum({$<Demanda = {"=Len(Trim([Demanda]))>0"}>} Demanda)
  • Esperados = Sum({$<DemandaF = {"=Len(Trim([DemandaF]))>0"}>} DemandaF)

Just in case, to clarify that I'd like to remove the Reales line from May onwards, but not the Esperados line. Reales corresponds to real data and Esperados to a future prediction.arrow.png

BrunPierre
Partner - Master
Partner - Master

=Sum({$<FechaDate={"=Sum({1} Demanda)>0"}>} Demanda)

or

=If(Sum(Demanda) > 0, Sum(Demanda))

or removing zeros in the load script.

If(IsNull(Demanda) or Len(Trim(Demanda)) = 0,Null(), Demanda) as Demanda