Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Announcements

Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution.
**READ ALL ABOUT IT!**

- Qlik Community
- :
- All Forums
- :
- QlikView App Dev
- :
- Calculation inside of a diagramm / chart

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Anonymous

Not applicable

2013-01-21
08:44 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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

State | Duration |
---|---|

State_1 | 1 |

State_2 | 1.5 |

State_3 | 45 |

State_3 | 2 |

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

733 Views

1 Solution

Accepted Solutions

Anonymous

Not applicable

2013-01-21
09:43 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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

Jonathan

537 Views

6 Replies

Not applicable

2013-01-21
08:48 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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

537 Views

Anonymous

Not applicable

2013-01-21
08:53 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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

537 Views

Anonymous

Not applicable

2013-01-21
09:31 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@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

537 Views

Anonymous

Not applicable

2013-01-21
09:31 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@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

537 Views

Anonymous

Not applicable

2013-01-21
09:43 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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

Jonathan

538 Views

Anonymous

Not applicable

2013-01-21
11:20 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

and sum(if worked

Thx a lot

537 Views