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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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