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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If into setAnalysis

Expression-

SUM(IF((TranTyp = 'CO' OR TranTyp = 'CB' OR TranTyp = 'DR' OR TranTyp = 'RC' OR TranTyp = 'BP' OR TranTyp = 'TR' )

     AND TranDt>=$(vFromDate), TranAmt))/1000000


Can anybody help me convert in to setanalysis


Thanks In Advance


Guidence is Appreciated..


14 Replies
shraddha_g
Partner - Master III
Partner - Master III

Try

=DATE(IF(vFrequency = 'Y',DateCurrYearStart,

IF(vFrequency = 'Q',QuarterStart(TodayNum),

IF(vFrequency = 'M',MonthStart(TodayNum),

IF(vFrequency = 'D', Today)))))

Also check format of TranDt i.e whether it is Number format or Date, if in Date what is exact format

ayandey18
Partner - Contributor II
Partner - Contributor II

Try it,

IF((TranTyp = 'CO' OR TranTyp = 'CB' OR TranTyp = 'DR' OR TranTyp = 'RC' OR TranTyp = 'BP' OR TranTyp = 'TR' )

     AND TranDt>=$(vFromDate), Sum(TranAmt)/1000000)

jonathandienst
Partner - Champion III
Partner - Champion III

Need a couple more single quotes for vFromDate:

=Sum(

{<

    TranTyp = {'CO','CB','DR','RC','BP','TR'},

    TranDt={">='$(vFromDate)'"}

>}

TranAmt)/1000000

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

Or change vFromDate to a number (replace the Date() statement):

Num(IF(vFrequency = 'Y',DateCurrYearStart,

IF(vFrequency = 'Q',QuarterStart(TodayNum),

IF(vFrequency = 'M',MonthStart(TodayNum),

IF(vFrequency = 'D', Today)))))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
annafuksa1
Creator III
Creator III

if any of the propositions is not working can you post your app ?

If is working can you mark it as answered ?

Anna