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
Awoodfor
Frequent Visitor

Periodic Billing

Hello all, I am having some issues with trying to get the Periodic Billing Dax Formula to work  i have contracts that can be 1,2 or 3 year contract with Revenue recognized monthly with the first and last months being prorated.  

I get the 

Awoodfor_0-1673020606251.png

and i am not 100% why i verified each fields to make sure it wasnt a text field.  any help would be appreciated. Thank you

 

Total Amount =
VAR tmpCalendar = ADDCOLUMNS('DateDim',"Month",MONTH('DateDim'[FullDate]),"Year",YEAR('DateDim'[FullDate]),"MonthYear",VALUE(YEAR(DateDim[FullDate]) & FORMAT(MONTH(DateDim[FullDate]),"0#")))
VAR tmpBilling = ADDCOLUMNS(BillingContractItem,"MonthYearBegin",VALUE(YEAR('BillingContractItem'[RevenueStartDate]) & FORMAT(MONTH(BillingContractItem[RevenueStartDate]),"0#")),
"MonthYearEnd",VALUE(YEAR(BillingContractItem[ContractEndDate]) & FORMAT(MONTH(BillingContractItem[ContractEndDate]),"0#")))
VAR tmpTable =
SELECTCOLUMNS(
FILTER(
GENERATE(
tmpBilling,
SUMMARIZE(tmpCalendar,[Year],[Month],[MonthYear])
),
[MonthYear] >= [MonthYearBegin] &&
[MonthYear] <= [MonthYearEnd]
),
"Customer",BillingContractItem[Name],
"Year",[Year],
"Month",[Month],
"Amount",BillingContractItem[TotalContractItemValue]
)
RETURN SUMX(tmpTable,[Amount])
1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

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!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.