cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Value on last day of fiscal month

Hey guys, 

 

i have a question about Time-Intelligence functions.

I created a 544 fiscal calenar in powerQuery and now I am looking for a way to compare values on the last day of each month. 

My fiscal calendar starts on sunday --> May is 06.05.2018 - 02.06.2018

 

Now I want to compare the values of 02.06.2018 and 05.04.2018.

 

Does anybody know, how to build that formula?

 

 

Thank you

Gauß452

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution Sage
Solution Sage

Re: Value on last day of fiscal month

Hello,

 

Do you have your Fiscal Month as column? I recommend to add FiscalMonthNumber as basis to calculate:

 

FiscalMonthDateFiscalMonthNumb
Mai04.05.20185
Mai02.06.20185
.........

 

So you could 

LastDay:=CALCULATE([Measure];LASTDATE(FactTable[Date])) 

and

 

LastDayPM:=VAR PrevMonth=MAX(FactTable[FiscalMonthNumber])-1
RETURN
CALCULATE([LastDay];FactTable[FiscalMonthNumber]=PrevMonth)

View solution in original post

1 REPLY 1
Highlighted
Solution Sage
Solution Sage

Re: Value on last day of fiscal month

Hello,

 

Do you have your Fiscal Month as column? I recommend to add FiscalMonthNumber as basis to calculate:

 

FiscalMonthDateFiscalMonthNumb
Mai04.05.20185
Mai02.06.20185
.........

 

So you could 

LastDay:=CALCULATE([Measure];LASTDATE(FactTable[Date])) 

and

 

LastDayPM:=VAR PrevMonth=MAX(FactTable[FiscalMonthNumber])-1
RETURN
CALCULATE([LastDay];FactTable[FiscalMonthNumber]=PrevMonth)

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Community Summit Australia – Join Online!

Community Summit Australia – Join Online!

Be a part of the leading Microsoft Business Applications digital event, curated for the APAC community.

Top Solution Authors
Top Kudoed Authors