Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PBI_newuser
Post Prodigy
Post Prodigy

Sum of each year up to the current month

Hi, I have the below line and stacked column chart. The FY2023 sum is up to last month which is Feb'2023 but FY2021 and FY2022 is full year. How to show the sum for each year up to Feb only? E.g FY2021 up to Feb'2021, FY2022 up to Feb'2022 and FY2023 up to Feb'2023. 

 

PBI_newuser_0-1679381575831.png

 

8 REPLIES 8
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ahmedx
Super User
Super User

And you can  create fiscal year and month
Screen Capture #724.pngScreen Capture #725.png

 

Hi @Ahmedx , after created Fiscal month, how to make the VAR _NumberLastMonth to be same as Fiscal month but not Calendar month?
 
Measure =

VAR _NumberLastMonth = MONTHEOMONTH(TODAY(),-1))
VAR _Result = CALCULATE([sales],'Calendar'[monthnumber]<=_NumberLastMonth)

RETURN
_Result

 

 

Measure =
VAR _NumberLastMonth = 
CALCULATE(MAX('Calendar'[Fiscal month]),'Calendar'[Date]= EOMONTH(TODAY(),-1))

VAR _Result = CALCULATE([sales],'Calendar'[Fiscal month]<=_NumberLastMonth)
RETURN
_Result

 

Ahmedx
Super User
Super User

I'm not sure, but you can try writing the measure like this
Screen Capture #723.png

Ahmedx
Super User
Super User

Measure =
VAR _NumberLastMonth = CALCULATE(MAX('Calendar'[Fiscal month]),'Calendar'[Date]= EOMONTH(TODAY(),-1))

VAR _Result = CALCULATE([sales],'Calendar'[Fiscal month]<=_NumberLastMonth)
RETURN
_Result

Hi @Ahmedx , the financial year starts from october and ends in september. How to adjust the monthnumber for this ?

you can give your file to see how we can help. I especially need to see your calendar table

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.