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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Daily Revenue between Start and End Dates

Hello, 

I have something that should be fairly simple yet is proving more difficult todo in Power BI then I thought at first.

 

I have a simple table with the following fields:

 

StartDate

EndDate

DailyRevenue

Product

Territory

 

I've been able to create a line graph in Excel by creating a row for each date between the MinofStart and MaxofEnd dates with a VBA formula. I then summed the daily revenue by date with the following formula =SUMIFS(Final[DailyRevenue], Final[StartDate], "<="&[@[Dates:]], Final[EndDate], ">="&[@[Dates:]])

 

This I can then put into a simple pivot chart and using grouping drill down years, quarters, days.. ect.. 

How do I replicate this in PowerBI? I've tried a few options with a date table but can't get it to look right. I also tried to expand each line of each contract for each date but this failed as well due to too much data.

 

Thanks!

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

Try this formula

column=CALCULATE(SUM(Final[DailyRevenue]),
FILTER(ALL(Final),Final[StartDate]<=@[Dates:]&&Final[EndDate]>=@[Dates:]


 

Best Regards

Maggie 

Anonymous
Not applicable

Hello Maggie:

 

I got the following error.

 

The 'Dates:' parameter could not be resolved because it was referenced in an inner subexpression.

 

Thanks,

Jason

Hi @Anonymous

for "@[Date:]", i think @ is a table name and [Date:] is a column, so i use it in the formula in this way.

Is my understanding not correct? 

Could you share a screenshot about how these columns are to help me know exactly about your scenario?

 

Best Regards

maggie

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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