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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis formula

hi i would like to combine a  if statement and set analysis or rewrite the statement into set analysis.

SUM(if(Date2>=DateFrom and Date2<=DateTo,

{$<#Dat_O ={'1'}>} OrderRad.NettoBelopp * OH.Kurs_FSG_act))

at the moment i am experiencing syntax problems with this statement.

help is greatly appreciated.

Brad

1 Solution

Accepted Solutions
preminqlik
Specialist II
Specialist II

according to your expression try this

SUM({$<#Dat_O ={'1'}>}if(Date2>=DateFrom and Date2<=DateTo,

OrderRad.NettoBelopp * OH.Kurs_FSG_act))

and also try this

Sum({<Date2={'>=$(=DateFrom)<=$(=DateTo)'},Dat_O ={'1'}>} OrderRad.NettoBelopp * OH.Kurs_FSG_act)

View solution in original post

3 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Is DateFrom and DateTo are variables?  If yes, then use this

=Sum({<Date2={'>=$(=DateFrom)<=$(=DateTo)'}>} OrderRad.NettoBelopp * OH.Kurs_FSG_act)

If they are datefields, then try if there is any ID field then use this, replace ID with your ID Fieldname

=SUM(Aggr(if(Date2>=DateFrom and Date2<=DateTo and [#Dat_O] = 1, OrderRad.NettoBelopp * OH.Kurs_FSG_act), ID))

Regards,

Jagan.

preminqlik
Specialist II
Specialist II

according to your expression try this

SUM({$<#Dat_O ={'1'}>}if(Date2>=DateFrom and Date2<=DateTo,

OrderRad.NettoBelopp * OH.Kurs_FSG_act))

and also try this

Sum({<Date2={'>=$(=DateFrom)<=$(=DateTo)'},Dat_O ={'1'}>} OrderRad.NettoBelopp * OH.Kurs_FSG_act)

preminqlik
Specialist II
Specialist II

if your DAt_O is in number then use this

Sum({<Date2={'>=$(=DateFrom)<=$(=DateTo)'},Dat_O ={1}>} OrderRad.NettoBelopp * OH.Kurs_FSG_act)