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.
Hello!
I have a dataset of values between two dates like this, but much larger:
Customer | Start | End | Sum |
1 | 1.5.2020 | 31.5.2020 | 100 |
2 | 14.5.2020 | 31.5.2020 | 100 |
3 | 1.6.2020 | 30.6.2020 | 200 |
4 | 1.5.2020 | 30.6.2020 | 300 |
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?
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
102 | |
101 | |
78 | |
70 | |
64 |
User | Count |
---|---|
140 | |
106 | |
100 | |
83 | |
73 |