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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

PowerBi Measures

Hello All,

 

I have files that contain current subscribers for each week of the past year that I've appended together. I've included a report date field to tell which report the record was from. I've calculated the total subscribers for the most recent week and am trying to calculate the total sub for the prior week. It is returning the correct total for the prior week subscribers but is not returning prior week totals for each week in my table.

 

This is the code I am using: 

 

Total Subscribers Previous Week =
VAR MostRecentWeek = MAX('Append1 - Current'[Report Date])
VAR PreviousWeek = MostRecentWeek - 7
RETURN
CALCULATE(
    DISTINCTCOUNT('Append1 - Current'[Account]),
    'Append1 - Current'[Report Date] = PreviousWeek,'Append1 - Current'[isCurrent] = "Current"
)
 
 
Anyone know what I could be doing wrong?
 
bmontoni_0-1729715603323.png

 

1 ACCEPTED SOLUTION
audreygerred
Super User
Super User

Hi! Here is a great article that describes how to do WoW measures: Week-related calculations – DAX Patterns

Scroll until you find this section and it walks you through setting up the DAX you will need:

audreygerred_0-1729716699279.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
NordicDrow
Helper I
Helper I

Hi there!

If you have a file with columns "Date", "Prior Week Date" and "Subscribers", you could just go to PowerQuery, merge table, merge with itself, columns "Prior Week" in the first to "Date" in the second. Then just expand "Subscribers".

Hope it helps, tell me if you need any further assistance.

audreygerred
Super User
Super User

Hi! Here is a great article that describes how to do WoW measures: Week-related calculations – DAX Patterns

Scroll until you find this section and it walks you through setting up the DAX you will need:

audreygerred_0-1729716699279.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.