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: 
KommulaRahul
Contributor III
Contributor III

How to write the below excel formula in qlik using set analysis

Look into the below attachment

Labels (1)
7 Replies
ajaykakkar93
Specialist III
Specialist III

Hi,

Code from Excel to Qlik:

=if( LEN(TRIM([DELIVERED FORMATTED])) =0 , '' ,
	if( TRIM([ORDER STATUS]) = 'DELIVERED' , '•' ,
		if( [DELEVERY WINDOW STATRTIME] <= [DELIVERED FORMATTED] , TRUE ,
			if( [DELIVERED FORMATTED] <= [DELEVERY WINDOW ENDTIME] , FALSE ,
				'NA'		
			) 
		)
	)	
)

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting

KommulaRahul
Contributor III
Contributor III
Author

Can u write the same expression in Qlik

By using set analysis By using Count? 

ajaykakkar93
Specialist III
Specialist III

What exactly do you want to achieve provide a data set for better understanding.

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting

KommulaRahul
Contributor III
Contributor III
Author

Hi Ajay

Below are the fields 

1. POS Order NO

2.Order Status

3. Delivered (Not delivered formatted)

4.[ Delivery Window StartTime]

5.[Delivery Window EndTime]

So the logic is Count the Pos orders  where the 

Delivered field is less than Delivery Window Start time field

And Delivered field is more than the Delivered window End Time field and order status is equal to delivered

Can u come up with an expression using set analysis

 

 

 

PrashantSangle

set analysis used with aggregated function. But the formula which you share as image don't have any aggregated function. It is just comparing field and assigning value. 

I will recommend you to write this expression in Script only. 

or you have to use if statement which @ajaykakkar93 suggested.

 

Regards,

Prashant Sangle

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 🙂
KommulaRahul
Contributor III
Contributor III
Author

Ignore the image in that attachment

Follow the one where I described about those five fields. 

 

 

PrashantSangle

then provide sample data & required output. It is difficult to understand.

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 🙂