Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
goro2010
Creator
Creator

Expression, show data acording to date.

Good Day Everyone,

I am trying to do an expression that only rely on your date selection.

Currently my sum expression takes all the volumes of "qty" and give me the sum, regardless if you have selected a date or not.

I need the sum to be zero if no date have been selected, and only work out the sum of the date and / or date range that I have selected.

Is this possible?

Thank You!

1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be like:

If( GetSelectedCount(DateField), <Your expression>,0)

View solution in original post

6 Replies
tresesco
MVP
MVP

May be like:

If( GetSelectedCount(DateField), <Your expression>,0)

goro2010
Creator
Creator
Author

Brilliant, thank you for the quick response. I get now that the values is showing all zero's, but once I select the date now, I get all values -1.

Here is my expression: =If(GetSelectedCount(OrderDate), Sum(qty),0 )

Thank You!

awhitfield
Partner - Champion
Partner - Champion

Hi Jan,

I Guess one way is to add a calculation condition, so the chart isn't calculated at all until you select a date:

Then add a Custom error Message e.g. please select a date....

Andy

Kushal_Chawda

try this expression

=sum(Sales) * if(GetSelectedCount(Date)>0,1,0)


Note: Also, go to presentation tab of chart, and uncheck Suppress zero values , to show 0 values on chart

goro2010
Creator
Creator
Author

Hello, I have found that there was an issue with my expression, it is working brilliant now! - Thank You

goro2010
Creator
Creator
Author

Also working - Thank You