Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi @ahmoh43
Thanks for the solution @MFelix provided, and i want to offer some information for you to refer to.
Sample data
Create a measure.
MEASURE =
CALCULATE (
SUM ( 'Table'[Value] ),
ALLSELECTED ( 'Table' ),
'Table'[WeekNo] <= MAX ( 'Table'[WeekNo] )
)
Then put the the measure to the y-axis.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ahmoh43
Thanks for the solution @MFelix provided, and i want to offer some information for you to refer to.
Sample data
Create a measure.
MEASURE =
CALCULATE (
SUM ( 'Table'[Value] ),
ALLSELECTED ( 'Table' ),
'Table'[WeekNo] <= MAX ( 'Table'[WeekNo] )
)
Then put the the measure to the y-axis.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ahmoh43,
For this you need to create a cummulative measure that will allow to have the calculation for each week.
You can do a measure similar to this one:
Weekly Cumulative = CALCULATE (SUM(Table[Column]), Table[Week] >= MAX(Table[Week]))
Be aware that I'm assuming that you are only selecting a specific year for the visualization of the chart.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi MFelix - What if I wanted to do something similar comparing 2023-2024 by week but for the last 2 quarteres of the year? Can you add a filter for year as well?
Hi @SteffanieJ ,
Yes you can do that depending on the result you want to achieve you can add additional filter to the calculation to get the previous year values.
Depending on how you have the setup of your model you can do it using the DATEADD syntax for example or SAMEPERIODLASTYEAR or forcing the year to be equal to MAX(Year) - 1
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMFelix - I have the date add formula in the 2023 and 2024 columns. Here are the formulas used last year but when I change them to -2 and -1 year and then change my created year to 2025 the running total column goes blank.
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português