Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shiveshsingh
Master
Master

Help required in one Expression

Hello Guys

I need one help in below expression - 

(SUM({$<OrderDate={">=$(=DATE(MonthStart(MAX({$}OrderDate)),'DD/MM/YYYY'))<=$(=Date(MAX(OrderDate),'DD/MM/YYYY'))"}, FiscalMonth, Date,EXT_NEW_FLAG = {'N'}>} ABC))

Dimension - Day

Issue  - When i use EXT_NEW_FLAG = {'N'} in set expression, i get only those days which have this value. I don't get the days where the expression yields null.

like - If expression value is not present for 15 jan and 16 jan, these two days will not be shown in x axis

 

But when i remove EXT_NEW_FLAG = {'N'} in set expression, i get all the days of the current month whether expression gives value or is null.

 

 

Any leads?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Sorry, I missed that. You can try tweaking the expression like:

 

(SUM({$<OrderDate={">=$(=DATE(MonthStart(MAX({$}OrderDate)),'DD/MM/YYYY'))
<=$(=Date(MAX(OrderDate),'DD/MM/YYYY'))"}, FiscalMonth, Date>}
If(EXT_NEW_FLAG = 'N', ABC))) 

View solution in original post

11 Replies
Silambarasan1306
Creator III
Creator III

My understanding is, Incase if the value is not available for a specific day, it should be shown as null. Don't uncheck the include zero values option in the add-ons option.
JordyWegman
Partner - Master
Partner - Master

Hi,

This is because the expression only is true for those days. When it's not true, it won't show the values. What happens if you just ad 1 as an expression? It should give you all the days again.

Jordy

Climber

Work smarter, not harder
shiveshsingh
Master
Master
Author

Thanks, I've already tried that. Not working.

shiveshsingh
Master
Master
Author

Let me give it a try.

tresesco
MVP
MVP

What do you wish to get as a result? This behavior is expected. If you want to still show the excluded values, try :

 - Check 'Show All Values' in dimension tab

- Uncheck 'Suppress Zero Values' in presentation tab.

- Check 'Suppress When Value is Null' in dimension tab

shiveshsingh
Master
Master
Author

I am working in qliksense, have already done that but no luck.

tresesco
MVP
MVP

Sorry, I missed that. You can try tweaking the expression like:

 

(SUM({$<OrderDate={">=$(=DATE(MonthStart(MAX({$}OrderDate)),'DD/MM/YYYY'))
<=$(=Date(MAX(OrderDate),'DD/MM/YYYY'))"}, FiscalMonth, Date>}
If(EXT_NEW_FLAG = 'N', ABC))) 
pradosh_thakur
Master II
Master II

Try this please

 

(SUM({$<OrderDate={">=$(=DATE(MonthStart(MAX({$}OrderDate)),'DD/MM/YYYY'))<=$(=Date(MAX(OrderDate),'DD/MM/YYYY'))"}, FiscalMonth, Date,EXT_NEW_FLAG = {"=match(EXT_NEW_FLAG ,'N') or len(trim(EXT_NEW_FLAG )) =0"}>} ABC))

Learning never stops.
shiveshsingh
Master
Master
Author

Hi @tresesco

Thanks, it worked.

Can you please explain ?