Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

Nested if statement problesm - With Fractile

Hello

I have built an expression which contains a nested If Statement and the set analysis within it is driven by what the user selects from the master calender

The first part of the statement works O.K, but it is the second part I am struggling with

I have had some help and someone kindly told me that I needed to following this criteria

Time(Fractile(If(cond1, v1, if(cond2, v2, v3))),'format')

I am however still struggling to get my statement to work, can anyone help me rewrite the following statement

 

=Time(Fractile(If(v_Start_Date_ED = v_Min_Date_ED_Calender and v_End_Date_ED = v_Max_Date_ED_Calender,[Total Wait]),0.95)/1440,

(If(FactDate>=$(v_Start_Date_ED) and FactDate <=$(v_End_Date_ED),[Total Wait],'hh:mm')))

Kind Regards

Helen

1 Reply
marcus_sommer

There is no set analysis within your expression, this are normal if-functions - but this isn't bad then it is most often easier. What could be wrong: FactDate could be a string or have another format and [Total Wait] couldbe  with this conditions not unique. Perhaps you need here more/better conditions or an aggregation like max/avg/only([Total Wait]).

- Marcus