Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
LaraLiselotte
Frequent Visitor

Periodic billing cycles with quarters

Hi all,

 

I am trying to create an overview the expected revenue per month for a subscription based product which our customers can either pay per month, per year or per quarter.

I found a couple of examples that have been helpful such as the periodic billing example by Greg_Deckler, however this examples doesn’t take into account different pay frequencies.
I am mainly struggling to calculate the quarter revenue on the right dates.

 

My data looks like this:

customer

Starting date

frequency

value

total value

1

1-1-2021

year

100

100

2

1-2-2021

month

10

120

3

1-3-2021

quarter

25

100

4

1-4-2021

quarter

100

100

5

1-5-2021

month

10

120

 

So for example for customer 3, their subscription starts on 1-3-2021 and their next payment should be on 1-6-2021 and the next on 1-9-2021 etc. 

 

My expected outcome would be something like this:

 

data.PNG

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@LaraLiselotte , Try a new table like

 


Addcolumns(
filter( generate(Table, generate(1,24,1) ), ( [frequency] ="Year" && [Value] <=2 ) ||

( [frequency] ="quarter" && [Value] <=8 ) || ( [frequency] ="month" && [Value] <=24 ) )
, "New Date" , date(year([Starting date]) +if([frequency] ="Year", [Value],0) , month([Starting date]) +if([frequency] ="quarter", [Value]*3,[Value]), day([Starting date]) ))

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@LaraLiselotte , Try a new table like

 


Addcolumns(
filter( generate(Table, generate(1,24,1) ), ( [frequency] ="Year" && [Value] <=2 ) ||

( [frequency] ="quarter" && [Value] <=8 ) || ( [frequency] ="month" && [Value] <=24 ) )
, "New Date" , date(year([Starting date]) +if([frequency] ="Year", [Value],0) , month([Starting date]) +if([frequency] ="quarter", [Value]*3,[Value]), day([Starting date]) ))

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thank you for your reply! 

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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