Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
lylererger
Contributor II

Straight Table Calculation for the Previous Date Formula

Hi friends!

Help to write the formula that calculates values for the previous period inside current period in chart.

Like on screenshot below:

111.PNG

Trying to calculate measure "VALUE PREV DATE"

Sum(Aggr(sum({<Date={"$(=If(Dimensionality()=0,
Date(MonthEnd(AddMonths(max(
Date),-1))),
Date(MonthEnd(AddMonths(max(
Date),-1)))))"}>}  [VALUE]),TB))


Doesnt works, because showing single value


Please help!


Thanks in advance.



11 Replies
MVP
MVP

Re: Straight Table Calculation for the Previous Date Formula

What output you are looking for?

lylererger
Contributor II

Re: Straight Table Calculation for the Previous Date Formula

Like that:

     

TBDATEVALUEPREV DATEVALUE PREV DATE
101.01.2017100
202.01.201720001.01.2017100
303.01.201730002.01.2017
404.01.201740003.01.2017
505.01.201750004.01.2017
MVP
MVP

Re: Straight Table Calculation for the Previous Date Formula

Only 100?

No value for other columns?

lylererger
Contributor II

Re: Straight Table Calculation for the Previous Date Formula

No It's not

MVP
MVP

Re: Straight Table Calculation for the Previous Date Formula

I mean you want 100 for last column and 2nd Row only...
what about 3rd row, 4th row etc?

No value?

What is the logic behind the 100?

lylererger
Contributor II

Re: Straight Table Calculation for the Previous Date Formula

My falt. I need to get table like this:

     

TBDATEVALUEPREV DATEVALUE PREV DATE
101.01.201710002.01.2017200
202.01.201720003.01.2017300
303.01.201730004.01.2017400
404.01.201740005.01.2017500
505.01.2017500
lylererger
Contributor II

Re: Straight Table Calculation for the Previous Date Formula

Any ideas ?

MVP
MVP

Re: Straight Table Calculation for the Previous Date Formula

Is this Previous Date or Next Date?

Your Date Format is DD.MM.YYYY or MM.DD.YYYY?

lylererger
Contributor II

Re: Straight Table Calculation for the Previous Date Formula

Previous Date like Date(MonthEnd(AddMonths(max(Date),-1)))).

Date format DD.MM.YYYY