3 Replies Latest reply: Nov 2, 2015 3:29 AM by chi tran

# equation on the first/last month of the selection

Hi,

i am trying to create a waterfall chart in qlikview to display the movement within a period: Balance start of period - total Loss -total Gain - Balance end of period.

I've done this in qliksense before and there was no issue (see image below). My expression to calculate the "Balance start" is: sum({<[movement waterfall]={'Start of the period'},PPeriod={\$(=Min(PPeriod))}>}[Product in movement waterfall])

However, my expression in qlikview returns nothing (no data to display). It seems that PPeriod={\$(=Min(PPeriod))} creates issue:

- I create a straight table to test, and when i use "if" in the equation, i have the correct result:

expression: if(PPeriod=\$(=Min(PPeriod)),sum({<[movement waterfall]={'Start of the period'}>}[Patients in movement waterfall]))

result in straight table (#product start): correct number

- I create a bar chart

expression : sum({<[movement waterfall]={'Start of the period'},PPeriod={\$(=Min(PPeriod))}>}[Products in movement waterfall])

Result: no data to display.

What do i miss??

• ###### Re: equation on the first/last month of the selection

Hi,

&

why cant you use if in bar chart as well .

• ###### Re: equation on the first/last month of the selection

Maybe it's just a formatting issue of your period set modifier:

sum({<[movement waterfall]={'Start of the period'},PPeriod={\$(=Date(Min(PPeriod),'MMM YYYY'))}>}[Products in movement waterfall])

• ###### Re: equation on the first/last month of the selection

thanks for the suggestion, but i've tried and it didn't work