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

Announcements
Mastering Change Data Capture: Read Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Divide gives incorrect value

Hi,

  I did some expression as follows

num($(vACD_HoldTime)/$(vACD_Handle_Time),'###.###')     gives 2.000 value.

based on the my analysis vACD_HoldTime gives 0 value and vACD_Handle_Time gives 40 value.when we do divide function it has to display 0 but it shows 2.000 value. Please help me,


Thanks,

 

1 Solution

Accepted Solutions
Not applicable
Author

I guess i the problem is a missing bracket, but without data we can only guess

sum({<PeripheralCallType = {'2'}>} HoldTime)  / $(vACD_TalkTime) + $(vACD_WorkTime) + $(vACD_HoldTime)

When dividing and multiplying with variables, always make some outer brackets to be safe, even if not needed:

try

/e fixed

num(

     ($(vACD_HoldTime)) / ($(vACD_Handle_Time))

     ,'###.###,')

It could also be caused of a one to many data situation, as the first variable includes a sum aggregation and the second doesn't - or probably double data entries which arent shown when getting the data in a listbox without unique ID

View solution in original post

6 Replies
PrashantSangle

Hi,

If possible post your application??

if not then post $(vACD_HoldTime) and $(vACD_Handle_Time) variable expression..

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable
Author

Hi max,

  Thanks for your reply,App size is huge,

My formulas are

vACD_HoldTime=sum({<PeripheralCallType = {'2'}>} HoldTime)

vACD_Handle_Time=$(vACD_TalkTime)+$(vACD_WorkTime)+$(vACD_HoldTime)

Thanks,

PrashantSangle

Hi,

Are you using it in chart or text Object?

Also check individually vACD_HoldTime and vACD_Handle_Time in text object.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
prieper
Master II
Master II

Suggest to

a) leave away for a moment the formatting (NUM)

b) enter both parts with "="-sign into a textobject and check the resulting values manually on correctness/plausibility.

c) if both correct, the result should be as well.

HTH Peter

Not applicable
Author

I guess i the problem is a missing bracket, but without data we can only guess

sum({<PeripheralCallType = {'2'}>} HoldTime)  / $(vACD_TalkTime) + $(vACD_WorkTime) + $(vACD_HoldTime)

When dividing and multiplying with variables, always make some outer brackets to be safe, even if not needed:

try

/e fixed

num(

     ($(vACD_HoldTime)) / ($(vACD_Handle_Time))

     ,'###.###,')

It could also be caused of a one to many data situation, as the first variable includes a sum aggregation and the second doesn't - or probably double data entries which arent shown when getting the data in a listbox without unique ID

Anonymous
Not applicable
Author

Hi marcus,

  Thanks for your reply.its working fine.Yes its brackts issue.

Now i got currect result.

Thanks,