Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
wendytham
Contributor II
Contributor II

How to input "OR" set expression in report editor

Hi All,

I would like to create a title in my report like "Sales start=07/2018 / Factory = ABC".

Some of the model in my data has sales start date, and some don't have.

In order to show the sales start date in the report, I used the below expression (highlighted in red) in my report editor.

However, the below expression only apply for those models that do not have sales start date.

If the model has sales start date in the raw data, it will show empty field. (If i changed the expression to Date(SalesstartDate, 'YYYY/MM'), the date will be shown in the report.)

How to use "OR" expression to enable both date show in the report?

='Sales start= ' Date(firstsortedvalue ( {<[Accumulated Sales Qty]={'>=1'}>}  Monthname, [Accumulated Sales Qty]),'YYYY/MM') & '  /  Factory= '& if(Isnull(Factory) , 'Unknown' , Factory)

1 Solution

Accepted Solutions
sunny_talwar

May be this

='Sales start= ' &

Alt(Date(SalesstartDate, 'YYYY/MM'),

Date(FirstSortedValue({<[Accumulated Sales Qty] = {'>=1'}>}  Monthname, [Accumulated Sales Qty]), 'YYYY/MM'))

& '  /  Factory= ' & If(IsNull(Factory) , 'Unknown' , Factory)

View solution in original post

5 Replies
Anil_Babu_Samineni

Perhaps this?

='Sales start= ' Alt(Date(firstsortedvalue ( {<[Accumulated Sales Qty]={'>=1'}>}  Monthname, [Accumulated Sales Qty]),'YYYY/MM'),firstsortedvalue ( {<[Accumulated Sales Qty]={'>=1'}>}  Monthname, [Accumulated Sales Qty])) & '  /  Factory= '& if(Isnull(Factory) , 'Unknown' , Factory)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
wendytham
Contributor II
Contributor II
Author

Hi Anil,

It only works for those models that do not have SalesstartDate.

Thank you.

sunny_talwar

May be this

='Sales start= ' &

Alt(Date(SalesstartDate, 'YYYY/MM'),

Date(FirstSortedValue({<[Accumulated Sales Qty] = {'>=1'}>}  Monthname, [Accumulated Sales Qty]), 'YYYY/MM'))

& '  /  Factory= ' & If(IsNull(Factory) , 'Unknown' , Factory)

wendytham
Contributor II
Contributor II
Author

This doesn't work as well.

sunny_talwar

Would you be able to share a sample to show the issue?