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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Summing up revenue to selected date and display for individual months as per the selection

Hi,

I have a requirement where in I need to display total revenue as on the selected date and them show it for indiuidual months in the selected intervals, I have tried creating an YTD measure but it doesn't meet my requirement,

I am attaching the screen clip for the reference.

 

Capture.PNG

 

As it can be seen in the slicer the selected dates are 06-01-2019 to 30-11-2019, so my requirement is at the starting of the date(i.e) 06-01-2019 i want to see total revenue of previous time and then it should be individual revenue for each months.

I am struggling to figure out a way to resolve this, I would be thankful if i can get any help.

1 ACCEPTED SOLUTION

@Anonymous try this measure , for this kind of calculations it is suggested to have calendar table in your model.

Running Total = 
CALCULATE ( 
SUM ( 'Table1'[Revenue (Base)] ),
FILTER ( ALLSELECTED ( Table1 ), Table1[Effective Start Date] <= MAX ( Table1[Effective Start Date]) )
)

 image.png



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

5 REPLIES 5
parry2k
Super User
Super User

@Anonymous try this for running total

 

Running Total = 
CALCULATE ( 
SUM ( Table[Amount] ),
FILTER ( ALLSELECTED ( Calendar ), Calendar[Date] <= MAX ( Calendar[Date] ) )
)

 



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.

Anonymous
Not applicable

Thanks @parry2k 

I have got the running totals, but still i can't figure it out how to display the total revenue since strating of time at the selected start date, running total is giving me the total of staring month and then it move forward adding up revenues for each month.

 

Thanks.

@Anonymous the measure should start from the first date selected in the slicer? Is that not working? If not can you share pbix file with sample data?



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.

Anonymous
Not applicable

@parry2k  Here is the link to the sample .pbix file, Please do let me know if this can be achieved.

 

https://drive.google.com/open?id=1WYht_KjAsy1s9OJOpEn6djXrhNdL4r3l 

 

 

Thanks

@Anonymous try this measure , for this kind of calculations it is suggested to have calendar table in your model.

Running Total = 
CALCULATE ( 
SUM ( 'Table1'[Revenue (Base)] ),
FILTER ( ALLSELECTED ( Table1 ), Table1[Effective Start Date] <= MAX ( Table1[Effective Start Date]) )
)

 image.png



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