Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
josephinetedesc
Creator III
Creator III

How is Qlikview treating my date/numbers?

I do not understand what is happening here - so going quietly crazy Jo

Count({$}[UtilPatName])QCL - CTSTART - QCLrawQCLDate - rawCT
1.013.05.513.0
1.019.80.619.8
1.070.70.68.8

3.0

103.5

-

Qlikview will not give me a total

-

Qlikview will not give me a total

3.0103.56.741.6
8 Replies
sunny_talwar

What is your expression for START - QCL and rawQCLDate - rawCT?? I think you should be able to use Aggr function to get a total you desire(if it is a pivot table):

=Sum(Aggr(YourCurrentExpression, YourDimensions))

and use Sum as total mode for straight table:


Capture.PNG

josephinetedesc
Creator III
Creator III
Author


when i use (qclDate - ctDate) - right answer, when i use sum(qclDate - ctDate) - wrong answer.

as soon as I try to do an expression apart from a simple subtraction - wrong answer

sunny_talwar

So why can't you use it without sum if it gives you the correct answer.

Best,

Sunny

sasiparupudi1
Master III
Master III

use

rangesum (qclDate,- ctDate)

hth

Sasi

jonathandienst
Partner - Champion III
Partner - Champion III

=Sum(Aggr(qclDate - ctDate, <your table dimensions>)

<your table dimensions> is a comma separated list of all the dimensions in the table. They must be fields, not calculated dimensions.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
hic
Former Employee
Former Employee

You must use an aggregation function (e.g. Sum(START-QCL) ) to define what QlikView should do if there are several records per dimension value. See Use Aggregation Functions!

Further, the totals in QlikView are by default not the sum of rows. Rather, it is the expression calculated over the entire data set. The difference is when one record in the source data contributes to two lines in the chart - should this record then be double counted or not? Usually it should not, and then you should use Expression total.

HIC

josephinetedesc
Creator III
Creator III
Author

Hi Henric and Jonathon - I cannot find the correct button for both of you ... the only action I can get is Helpful??? and Like works!

josephinetedesc
Creator III
Creator III
Author

Sorry everybody, but I thought I wrote this 10 mins ago...  but I could not find it...

I think I have done something really silly- but cannot check till Tuesday. 

aggr(sum((rawQCLDate - rawCT)),UtilClinic)  - versus sum(aggr(

I hope it is that simple ...

Jo


I am going crazy trying to see how QlikView is treating my numbers.  I am wondering if the answer is set analysis.  I thought I had solved my problem using the function Aggr - however - it works on an exmaple I made up but not in real life.  Sorry not sure how to get the info here ...

Jo

rawQCLDate - rawCTDate = 8.8 (correct)  (THIS WILL NOT TOTAL in QLIKVIEW)

sum({$}(rawQCLDate - rawCT))  = 77 (not even sure where that number is coming from

aggr(sum((rawQCLDate - rawCT)),UtilClinic)  - gives me the same answer

UtilClinicUtilPatNameURNCTQCLStart DateCount({$}[UtilPatName])QCL - CTSTART - QCLrawQCLDate - rawCT
Neuro,namex15410021628/05/2015 11:3010/06/2015 11:2216/06/2015 0:001.013.05.513.0
Neuro,namey1511037639/06/2015 15:3029/06/2015 10:4030/06/2015 0:001.019.80.619.8
Neuro,namez941003861/06/2015 13:0010/06/2015 9:0011/06/2015 0:001.070.70.68.8
Total3.0103.5--
WHAT THE ANSWER SHOULD BE3.0103.5