Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
pnn44794
Partner
Partner

Need To Combine If With Num and Sum Expression

Hello:

I'm having problems with the expression below.  I obviously don't have it in the right format.  I may also be over-complicating what I'm trying to do.  This expression is for a Label and thus in the Label field of an expression.  For the Label, I'm trying to sum the values which are in gigabytes, convert them to terabytes and then append the text that you see below.  However, the data has blanks in the Unplanned Reason field and a default value of "All Unplanned Requests Require A Reason", both of which I need to exclude to avoid an incorrect Sum.  Qlikview does not like the third comma (the one before [Unplanned Reason]

=If((not Match([Unplanned Reason], 'ALL Unplanned Requests Require A Reason', ''), [Unplanned Reason]), Num((Sum({<Approved_YearMonth={"*"} - {'2016*'} >}SAN) /1024), '#0.0') & ' TB IN UNPLANNED REASONS YTD')

Does anyone know how this should be formatted?  As always, thanks in advance for any and all help.

1 Solution

Accepted Solutions
sunny_talwar

How about this:

=Num((Sum({<Approved_YearMonth={"*"} - {'2016*'}, [Unplanned Reason] -= {'ALL Unplanned Requests Require A Reason', ''}>}SAN) /1024), '#0.0') & ' TB IN UNPLANNED REASONS YTD'

View solution in original post

2 Replies
sunny_talwar

How about this:

=Num((Sum({<Approved_YearMonth={"*"} - {'2016*'}, [Unplanned Reason] -= {'ALL Unplanned Requests Require A Reason', ''}>}SAN) /1024), '#0.0') & ' TB IN UNPLANNED REASONS YTD'

View solution in original post

pnn44794
Partner
Partner
Author

Hello Sunny!  Thank you.  That did indeed work.  I was making harder trying to use the not match.  Thank you for your help!!!!