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.
My invoice data has some annual payments and my requirement is to accrue the revenue monthly for reporting. This is a view of a particular payment made in Oct 2022 with a contract/service period of 7/1/22 to 6/30/23.
The revenue is prorating nicely by each month in the service period, but I can't get it to show in the totals.
Revenue Prorated =
VAR CurrentDate = MAX( 'Date'[Date] )
VAR RevProrated =
CALCULATE(
SUM( 'Invoice'[Rev Prorated] ),
KEEPFILTERS( 'GL Lookup'[Bill Type] IN{ "Recurring", "Non-Recurring" } ),
KEEPFILTERS( 'GL Lookup'[Tower] = "MITO" ),
ALL( 'Date' ),
'Invoice'[Service Start Date] <= CurrentDate,
'Invoice'[Service End Date] >= CurrentDate,
NOT ( ISBLANK( 'Invoice'[Service End Date] ) )
)
RETURN
RevProrated
( The two keepfilters arguements just filter my invoice table to the business unit I'm reporting on. )
Any help is greatly appreciated! Thanks in advance!
Here are the applicable parts of my invoice table:
I have a calculated column that divides the total contract revenue ( 'Invoice'[Ext Price] ) by the number of months in the contract, as follows:
Rev Prorated =
VAR Months =
IF(
DAY( 'Invoice'[Service Start Date] ) = 01,
DATEDIFF( 'Invoice'[Service Start Date], 'Invoice'[Service End Date], MONTH ) + 1,
DATEDIFF( 'Invoice'[Service Start Date], 'Invoice'[Service End Date], MONTH )
)
VAR MonthlyRevenue =
IF(
Months > 1,
DIVIDE( 'Invoice'[Ext Price], Months )
)
RETURN
IF(
'Invoice'[Billing Frequency] IN{ "Annual", "Annually", "Multiple", "Quarterly" },
MonthlyRevenue,
BLANK()
)
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 |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |