Skip to main content
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
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
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?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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".