Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculation inside of a diagramm / chart

Hello,

I have the following problem:

I have a Table with different states and time linked to this state

StateDuration
State_11
State_21.5
State_345
State_32

What I did was putting the State as dimension and sum(Duration) as formula.

The problem now is , that I have to split the State_3 in 3 other substates.

I tried the following: I put the State our of dimentions and added every State as formula

(If(State=State_1;sum(duration);0)

and called the formula State_1.

Unfortunatly QlikView is showing me always 0 as the result..

Any idea?

Cheers chesterluck

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

How about the second point about the sum(if... vs. if(sum... ordering ? Does that help.

Jonathan

View solution in original post

6 Replies
Not applicable
Author

Hi,

why don't you add another subdimension as State_3_1, State_3_2...

You can then display States 1, 2, 3 as total or see split states if you develop your graph

Christian

Anonymous
Not applicable
Author

QV uses commas instead of semicolons in if statements.

Also, if you have an expression with if(<test>,sum(<value>)) then the test is carried out across all the rows, not for each value in the field. Try instead sum(if(<test>,<value>)) to do a test at a record by record level.

Jonathan

Anonymous
Not applicable
Author

@Jonathan: I used of course commas in the formula - otherwise it wouls show a syntax error..

@Christion: I can surely do it in the loading process (probably I will), but I thought that such things can also be done in the chart itself...

Cheers chesterluck

Anonymous
Not applicable
Author

@Jonathan: I used of course commas in the formula - otherwise it wouls show a syntax error..

@Christion: I can surely do it in the loading process (probably I will), but I thought that such things can also be done in the chart itself...

Cheers chesterluck

Anonymous
Not applicable
Author

How about the second point about the sum(if... vs. if(sum... ordering ? Does that help.

Jonathan

Anonymous
Not applicable
Author

and sum(if worked

Thx a lot