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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SanderVeeken
Helper III
Helper III

Calculating monthly worth of subscriptions

Hello everyone,

 

I'm trying to calculate the monthly (and/or quarterly) worth of subscriptions. Ideally, I'd be able to slice and dice by date at will. My data model consists of a date table with explicit monthnames and quarters like this:

DateYearQuarterMonthMonthnameYearmonthSchoolyear

30-01-2023

202311January20230122/23

 

My subscribers table has a lot of columns but the relevant ones are:

Subscriberstartdateenddatetotallessondaystotalamountdailyamount
John01-09-202230-09-20222929010
Bill01-10-202231-10-2022301505
Henry15-11-202215-01-2023602404

 

There is currently no relationship between them.

 

There are lots of examples on how to calculate a "snapshot table", basically generate a list for each subscriber with every active date, but this is very ineffecient and quickly expands the number of rows to huge numbers. Ideally, I want a dax measure that calculates for every selectable period what the current worth is, so that I can select by day, month, quarter or year.

 

I got going with this clever post by Reza Rad. I modified the formula because I don't need a check for blank enddates and I wanted the sumx of dailyamount, not a countrows (for active subscriptions). So my formula ended up fairly simple:

 
Dailytotal =
var _currDate=SELECTEDVALUE('Date'[Date])
return

SUMX(
            FILTER(
                       'Subscribers',
                      ('Subscribers'[enddate]>=_currDate )
                      && 'Subscribers'[startdate]<=_currDate
                      ),
             'Subscribers'[dailyamount]
)
 
It seems to work great, except it won't summarize by month, quarter, year or really anything other than day. Even when I throw Date and Dailytotal in a table, it won't sum but only display it per day. I must be missing something obvious; how do I sum these values?
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You can reuse your daily total measure like

Total for selected dates = SUMX( VALUES( 'Date'[Date]), [Daily total])

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

You can reuse your daily total measure like

Total for selected dates = SUMX( VALUES( 'Date'[Date]), [Daily total])

Gah, I knew it had to be something simple, thank you so much! I'm sure I tried a variation on that, but I couldn't quite get what I wanted.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.