Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

khalander
Contributor II

Above and below function

Hi,

I have data like below.

I have used Above function but values is coming NULL.

Datesecond DateSalesCalcu
1/26/2016-20002000
2/1/20162/1/2016-
2/13/2016-50005000

wherever date is equal to second date i want to apply below condition and i want to show that in calcu.

above(sales)+((Below(sales)-Above(sales))*(secondate-date))/(Below(date)-Above(date))

but values is coming nulls for the above calculation

Please do the needful

12 Replies
MVP
MVP

Re: Above and below function

Do you have one dimension or multiple dimensions? May be you need to use Above(TOTAL....) and Below(TOTAL...)

khalander
Contributor II

Re: Above and below function

I have 3 dimensions.. Total also is not working

MVP
MVP

Re: Above and below function

Would you be able to share a sample?

khalander
Contributor II

Re: Above and below function

No Sunny, That is the sample data which i have shared

MVP
MVP

Re: Above and below function

okay

sfatoux72
Valued Contributor

Re: Above and below function

It's work fine with TOTAL

=If((Only(Date) - Only([second Date])) = 0,Below(TOTAL Sum(Sales)), sum(Sales))


= Above(TOTAL Sum(Sales))+((Below(TOTAL Sum(Sales))-Above(TOTAL Sum(Sales)))*(Only([second Date])-Only(Date)))/(Below(TOTAL Only(Date))-Above(TOTAL Only(Date)))

See the application in attachment

khalander
Contributor II

Re: Above and below function

Hi Sebastien,

Thanks for the reply..

Can you attach the application

khalander
Contributor II

Re: Above and below function

Still it is showing null values sebastien

sfatoux72
Valued Contributor

Re: Above and below function

The application was attached ???