Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
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
kaushiknsolanki
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
Author

Hi!

Will this help?

Regards

Henrik

Anil_Babu_Samineni

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
Author

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".