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
Anonymous
Not applicable

Need to calculate amount based on first bill date

There are five tables in my database:

Bill, Subscription, User, Credit card & Sites

 

In Subscription table, there is "type" column which contains below values:

  1. Free (free)
  2. Free plus (free)
  3. Pro Comped (free)
  4. Pro (paid = $15/mo)
  5. Growth (paid = $29/mo)
  6. Enterprise (paid = $99/mo)
  7. Pro Managed (paid = $custom)

Over time our users have paid the varying amount within these subscriptions type. There is a “schedule” field where we tell you if it is a monthly or yearly plan.

 

You will also need to note that Bills have a column called “status.” The different statuses that a bill can have are:

  1. Pending(this amount is considered as zero)
  2. Paid(+)
  3. Voided(+)
  4. Failed(this amount is considered as zero)
  5. Refunded (negative value)
  6. Charged back (negative value)

I have set value according to above status in calculated column "Amount Corrected"


Required Calculation: Need to find by looking for sites that are paying their very first bill through one of our paid subscriptions. Note: for annual plans, we will need to split the payment into 12 equal parts. solution required.png

I have created a measure "New MRR", it shows aggregate value for all date, but I need to show value only for the first bill date.

Please Guide

Thanks in advance! 

Please find the .pbix file link:

https://www.dropbox.com/s/b7blkkv32dcmkzw/Leith.pbix?dl=0

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Please try below measures:

first bill at =
CALCULATE ( MIN ( bills[bill_at] ), ALL ( bills[bill_at] ) )

First MRR =
CALCULATE (
    [New MRR],
    FILTER ( ALL ( bills[bill_at] ), bills[bill_at] = [first bill at] )
)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Please try below measures:

first bill at =
CALCULATE ( MIN ( bills[bill_at] ), ALL ( bills[bill_at] ) )

First MRR =
CALCULATE (
    [New MRR],
    FILTER ( ALL ( bills[bill_at] ), bills[bill_at] = [first bill at] )
)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.