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

Field derive from Percentage based on the Date range

Hello Team,

 

I need to derive fields from percentage from date range fields. Please find the below given sample data

From dateTo datePercentage
1-1-20193-31-20197
1-1-201912-31-20195
1-1-201912-31-20198
1-1-20193-31-20197
1-1-201912-31-20197
1-1-201912-31-20197
1-1-201912-31-20193
1-1-20193-31-20197
1-1-201912-31-20192.5

 

and, I need the out as below mentioned. 

From dateTo datePercentage_1
1-1-20193-31-20197
1-1-20193-31-20197
1-1-20193-31-2019

7

 

From dateTo datePercentage_2
1-1-201912-31-20195
1-1-201912-31-20198
1-1-201912-31-20197
1-1-201912-31-20197
1-1-201912-31-20193
1-1-201912-31-20192.5

 

Can you please help me anyone on this ASAP. 

 

Thanks in advance. 

1 Solution

Accepted Solutions
Raggs
Contributor III
Contributor III
Author

I got the answer for this.  

 

thank u

View solution in original post

2 Replies
Raggs
Contributor III
Contributor III
Author

I have used the below function however its not working

If(FromDate = '1/1/2019' and ToDate1 = '31/3/2019', Percentage, )   AS   Percentage_1,

If(FromDate = '1/1/2019' and ToDate1 = '31/12/2019', Percentage)   AS   Percentage_2

Raggs
Contributor III
Contributor III
Author

I got the answer for this.  

 

thank u