Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple if/else calculations

Hey guys,

I'm new to QlikView so I hope you can help me out! I need to calculate the price index as follow:

Selected month

Previous month compared to selected month

1. If revenue nov.'16 * m³ = 0, then 0
    else revenue nov.'16 / m³ nov.'16

2. If total 2016 = 0, then 0

    else if
    revenue * = 0, then show the value from calculation 1

    else revenue /

3. If calculation 2 = 0 or when (calculation 2 - calculation 2) = 0, then 0

    else (calculation 2 - calculation 2) / calculation 2

This is followed by some extra calculations:

A. (Sumproduct all rows from calculation 1 with total 2016 m³) / total 2016

B. (Sumproduct all rows from calculation 2 with total 2016 m³) / total 2016

C. 100 + (calculation B / calculation A -1) * 100

D. If calculation C = 0, then 0

    else (calculation C - calculation C) / 100

This is currently all in Excel (see attachment) but I want to get it done in QlikView. Does anyone have any ideas? Many thanks in advance!

2 Replies
sunny_talwar

Can you share the raw data behind this kind of output you need?

Not applicable
Author

The raw data looks like this:

Raw data.PNG

I hope it's useful!