Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I try to forecast the sales revenue over time. I made some progress, but the graph shows an incorrect values. The graph shows a value of 10,99, but the total amount of January should be 340. In case of Sales ID I expect January 340 Februari.
I have the following tables:
The table Dates contains the following columns
The table Services contains the following columns
Calculations
Measure = CALCULATE(SUM(Services[RevenuePerBillingDay]); FILTER(Services; COUNTROWS( FILTER( VALUES(CalendarDate[Date]); Services[StartDate]<=CalendarDate[Date] && Services[EndDate]>=CalendarDate[Date]) )>0 ) )
BillDays = CALCULATE( COUNT(CalendarDate[Date]); DATESBETWEEN(CalendarDate[Date];Services[StartDate];Services[EndDate]))
RevenuePerBillingDay = Services[Revenue]/Services[BillDays]
Solved! Go to Solution.
Hi @larbond,
You can try to use below formula to get the summary daily payment:
Total = VAR current_id = MAX ( Records[ID] ) VAR current_date = MAX ( 'Calendar'[Date] ) VAR curretn_Pay = CALCULATE ( MIN ( Records[PerDay] ), FILTER ( ALL ( Records ), current_date IN CALENDAR ( [StartDate], [EndDate] ) && [ID] = MAX ( Records[ID] ) ) ) RETURN curretn_Pay * COUNT ( 'Calendar'[Date] )
Notice: my formula only works when you limit date range to specific year, if you not choose the specific year, it will return wrong result.
Regards,
Xiaoxin Sheng
Finnaly, it works with an example of SQLBI.
https://www.sqlbi.com/articles/analyzing-events-with-a-duration-in-dax/
Hi @larbond,
You can try to use below formula to get the summary daily payment:
Total = VAR current_id = MAX ( Records[ID] ) VAR current_date = MAX ( 'Calendar'[Date] ) VAR curretn_Pay = CALCULATE ( MIN ( Records[PerDay] ), FILTER ( ALL ( Records ), current_date IN CALENDAR ( [StartDate], [EndDate] ) && [ID] = MAX ( Records[ID] ) ) ) RETURN curretn_Pay * COUNT ( 'Calendar'[Date] )
Notice: my formula only works when you limit date range to specific year, if you not choose the specific year, it will return wrong result.
Regards,
Xiaoxin Sheng
Finnaly, it works with an example of SQLBI.
https://www.sqlbi.com/articles/analyzing-events-with-a-duration-in-dax/
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
85 | |
85 | |
69 | |
67 | |
63 |
User | Count |
---|---|
210 | |
118 | |
116 | |
81 | |
74 |