Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression with diffrent date fields

I have two tables with datafields.

Table A:

contractid

periodend

    date(monthstart(periodend),'YYYY-MM') as PeriodEnd

serviceid

Table B:

serviceid

readingdate

    date(monthstart(readingdate),'YYYY-MM') as ReadingMonthYear

annualconsumption

Im using a listbox with the field "PeriodEnd" to choose the months where contracts end, and then a straight chart

with the dimension "PeriodEnd" and then expressions to show diffrent contracts.

What Im trying to figure out is how to show the correct annualconsumption for the PeriodEnd,

For ex, if PeriodEnd is "2016-12" the correct reading date for the consumption is "2017-01".

If I change "ReadingMonthYear" to "PeriodEnd" it gives me the consumption for "2016-12", how can I solve this with an expression?

4 Replies
MVP & Luminary
MVP & Luminary

Hi Henrik,

You can handle this using the set analysis, but it might be a little complex.

Can you share some sample data to test out.

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
Not applicable

Hi!

Will this help?

Regards

Henrik

I may miss few points to read, can you explain little more. When i opened the Application it is showing 2016-12-01. What are you expecting?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Not applicable

Im using a listbox with the field "PeriodEnd" to choose the months where contracts end, and then a straight chart

with the dimension "PeriodEnd" and then expressions to show diffrent contracts.

What Im trying to figure out is how to show the correct annualconsumption for the PeriodEnd,

For ex, if PeriodEnd is "2016-12" the correct reading date for the consumption is "2017-01-01".

If I change "ReadingMonthYear" to "PeriodEnd" it gives me the consumption for "2016-12-01".