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
aleksikar
New Member

Maximum value of active items per date?

Hello!

I have a dataset of values between two dates like this, but much larger:

 

Customer          Start                      End                     Sum
11.5.202031.5.2020100
214.5.202031.5.2020100
31.6.202030.6.2020200
41.5.202030.6.2020300

 

I would like calculate how much sum is active on each day. For example, sum on 1.5.2020 is 100 + 300 = 400 (customer 1 and 4 are active) and sum on 14.5.2020 is 100 + 100 + 300 = 500. In the end there should be a calendar table of each date between for example 1.5.2020 - 30.6.2020 and a column which shows the active sum per date. How can I do this on Power BI? 

1 REPLY 1
lucadelicio
Super User
Super User

Try to create a data table not connected using like a filter.
Then create a measure:
MEASURE =
SUMX(
Table
,IF(MIN(TableDate[date]) <= MIN(Table[Start]) and MAX(TableDate[date]) >= MAX(Table[End]), SUM(Table[Sum]), BLANK())
)


I hope I have been helpful.
It's more easier to help you if you upload your pbix.
Mark it as a solution if resolve your problem.

Ciao!

Luca D'Elicio

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.