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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.