Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pnn44794
Partner - Specialist
Partner - Specialist

Error In Number Format Within Expression

Hello:

I have the following expression which is used in a Segment for a Gauge chart.  There are no "errors" in the expression as identified by Qlikview.  However, the dollar amount I'm expecting to see while correct, does not format as expected.  The expected format is $###.  For example, I expect to see the number $192, but instead I get (no dollar sign) 192.4339230.  Here's the expression:

=Num(Sum({$<[Phase] = {Booked}, Phase, ID, [Item Owner], Submitter, [Item Validator], Confidence, [MYP Work Stream], [Save Initiative Category], [Sub Category], [Start Month], [Booking Month], [End Month]>} RangeMax([Finance Confirmed 2016 Savings], 0)/1000000),'$###0') + Num(Sum({$<[Phase] = {'Finance*', Implementation}, Confidence = {High}>} [Estimated Save]) /1000000 ,'$###0')

Any ideas anyone?  The objective, if it helps, is to get a total of everything Booked plus everything in Finance* and Implementation where the Confidence level is High.  I'll then need to replicate this for a couple of other scenarios.

Lastly, the reason I have a bunch of fields listed is in case someone filters for one of those fields.  Without listing them, the numbers are not correct.  As always, thanks in advance.

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hi 

just use the number function once and it'll work

the reason that when you add to different numbers Qlikview doesn't know which format to use on the combine number

and goes to default

=Num(Sum({$<[Phase] = {Booked}, Phase, ID, [Item Owner], Submitter, [Item Validator], Confidence, [MYP Work Stream], [Save Initiative Category], [Sub Category], [Start Month], [Booking Month], [End Month]>}RangeMax([Finance Confirmed 2016 Savings], 0)/1000000)+ Sum({$<[Phase] = {'Finance*', Implementation}, Confidence = {High}>} [Estimated Save]) /1000000 ,'$###0')

View solution in original post

4 Replies
lironbaram
Partner - Master III
Partner - Master III

hi 

just use the number function once and it'll work

the reason that when you add to different numbers Qlikview doesn't know which format to use on the combine number

and goes to default

=Num(Sum({$<[Phase] = {Booked}, Phase, ID, [Item Owner], Submitter, [Item Validator], Confidence, [MYP Work Stream], [Save Initiative Category], [Sub Category], [Start Month], [Booking Month], [End Month]>}RangeMax([Finance Confirmed 2016 Savings], 0)/1000000)+ Sum({$<[Phase] = {'Finance*', Implementation}, Confidence = {High}>} [Estimated Save]) /1000000 ,'$###0')

vinieme12
Champion III
Champion III

Try

=NUM( (Sum({$<[Phase] = {Booked}, Phase, ID, [Item Owner], Submitter, [Item Validator], Confidence, [MYP Work Stream], [Save Initiative Category], [Sub Category], [Start Month], [Booking Month], [End Month]>} RangeMax([Finance Confirmed 2016 Savings], 0) + Sum({$<[Phase] = {'Finance*', Implementation}, Confidence = {High}>} [Estimated Save]) )/1000000,'$###0')

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
pnn44794
Partner - Specialist
Partner - Specialist
Author

A big thanks Liron as that did indeed work!  I was over complicating it.  🙂  Thank you again and thanks for the explanation as that was really helpful.

pnn44794
Partner - Specialist
Partner - Specialist
Author

Hello Vineeth:

Thanks for your reply.  There is an error with it and I believe it's because of too many parentheses.  I think the first one right after NUM is not needed.  The expression editor says "Token don't match" and that parentheses is highlighted.

There's another error as well, but I'm not sure what it is.  The text box where I tested it states "Error:  Error in expression: Nested aggregation not allowed".

I appreciate you taking the time to reply.  Again, thanks.

P.S.  The only reason I mention the errors is in case someone else reads this thread and tries to use your expression.  I didn't have it right either.