Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
evansabres
Specialist
Specialist

Start chart at first non-zero value

I have a chart that has a dimension of date and an expression of orders. There are many dates that have a zero value for orders. The application is also built to make a selection first before viewing the chart. (The user makes a selection from a drop-down) After the user makes the selection, I want the chart to start at the first non-zero value as opposed to just the first date in the data set. Is that possible?

5 Replies
ogautier62
Specialist II
Specialist II

Hi

change your dimension as :

something like this :

if(DateOrder >= FirstSortedValue(total DateOrder,if( aggr(sum(expression order),Order>0,DateOrder)), DateOrder)

regards

PrashantSangle

can you explain with sample data? or screen shot of current output and required output.

regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
evansabres
Specialist
Specialist
Author

my fields are:

Dimension: DTE

Metric: TotalOrderValue

In your example, DateOrder would be the dimension? Expression order would be TotalOrderValue?

balabhaskarqlik

Try some thing like this:

=Max({< DTE={"<=$(=vEndDate)"}>} aggr(firstsortedvalue (Orders, -DTE), Orders))

Add some fields in this expression...

ogautier62
Specialist II
Specialist II

yes Dateorder would be DTE,

and expression order : TotalOrderValue

regards