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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
andrea_chiappo
Helper III
Helper III

Weekly sum over several years

I have looked at other questions and their replies, but I don't get the desired result.

 

I have two dimensions: a Calendar Table and my Users table.

Following the suggestion in 

https://community.powerbi.com/t5/Desktop/How-to-show-just-the-week-number-in-my-chart-when-I-have-da...,

I added to my Calendar table the week-of-the-year column. Since my this table spans 2018 to 2020,

the column run from 1 to 52 and over again for each consecutive year.

I also added a similar column to my Users table. However, my Users table has dates which run from

November 2018 to February 2020.

 

When I try using the latter, I simply get some (mysterious) values on an axis running from 1 to 52

Screenshot (21).png

 

However, when I try using the week quantity from the Calendar table (as in other solutions I found),

I get that (some equally mysterious) values are ordered in decreasing order.

 

Screenshot (22).png

 

I calculate WeeklyUsers measure with the following script

 

WeeklyUsers = SUMX(
FILTER(
DimUsers,
WEEKNUM(DimUsers[Date],2) = WEEKNUM(LOOKUPVALUE(DimUsers[Date],DimUsers[Index],DimUsers[Index]-1),2) &&
DimUsers[Date] <= LOOKUPVALUE(DimUsers[Date], DimUsers[Index], DimUsers[Index]-1)
),
DimUsers[DailyUsers]
)
 
What I aim for is a plot showing the number of weekly users (value) vs the corresponding week number (axis),
following the week order in the Users table (eg. 45, 46, 47, 48, 49, 50, 51, 52, 1, 2...)
 
Any idea anyone how to correct the plot? Thanks 
1 REPLY 1
amitchandak
Super User
Super User

If you want plot weeks across the year you need to have some context of the year into it

Like

Week year = Year & " " & Week

The option of the Sort column will not apply as the values of the week are not unique across the year.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors