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
GTPowerBIUser
Helper III
Helper III

Cumulative Totals by Company's Fiscal Year

Hello,

 

I'm trying to get cumulative totals using the following table:

 

Table Name: PS_SalesHistory

Columns: Sales, Effective Date, Fiscal Year

 

This calcuation is giving me cumulative total for all dates, but I need to break that up by the Fiscal Year column.

The fiscal year for my company is August 1 to July 31, so it doesn't follow the calendar year.

 

CALCULATE(
sum( PS_SalesHistory[Sales]),
FILTER(
ALLSELECTED(PS_SalesHistory),
PS_SalesHistory[Effective Date] <= MAX(PS_SalesHistory[Effective Date])
))
 
This is what it looks like right now:
2021-06-14_11-02-43.jpg
 
Each FY should have its own cumulative totals.
 
Is it possible to do this?
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@GTPowerBIUser when working with dates,  as a best practice add a calendar/date dimension your model, follow my blog post to add this table Create a basic Date table in your data model for Time Intelligence calculations | PeryTUS IT Solutio...

 

Create the following measure and use the Year from date dimension table.

 

CALCULATE(
sum( PS_SalesHistory[Sales]),
DATESYTD ( Calendar[Date], "07/31" )
)

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@GTPowerBIUser not sure why, change cross filter to single, and if doesn't work, share the pbix file, remove sensitive information before sharing.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

GTPowerBIUser
Helper III
Helper III

@parry2k 

 

I have a date dimension table, however  its not working with that table. When I insert your calculation I get:

 

2021-06-14_11-39-21.jpg

 

CALCULATE(
sum( PS_SalesHistory[Sales]),
DATESYTD ( Dim_Date[Date], "07/31" )
)
 
I have a relationship between Dim_Date and PS_SalesHistory on Effective Date and Date:
Cardinality - Many to One
Cross Filter - Both
parry2k
Super User
Super User

@GTPowerBIUser when working with dates,  as a best practice add a calendar/date dimension your model, follow my blog post to add this table Create a basic Date table in your data model for Time Intelligence calculations | PeryTUS IT Solutio...

 

Create the following measure and use the Year from date dimension table.

 

CALCULATE(
sum( PS_SalesHistory[Sales]),
DATESYTD ( Calendar[Date], "07/31" )
)

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.