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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Victormar
Advocate III
Advocate III

Running total not showing value if not adding

Hello community,

 

I have a quick and easy question, I believe, but I haven't found how to do it. I am calculating cumulative totals, but using my formula when a week doesn't have a value, it wouldn't display any value, and I would like to have the previous one; Weeks 12 and 13 doesn't have any value, but I would still like to have week's 11 value:

 

Victormar_0-1656397919098.png

 
Cumulative =
CALCULATE (
sum(Table1[hour]),
FILTER (
ALL('DIM_Calendar'[Date]),
'dim_calendar'[Date] <= MAX(DIM_Calendar[Date])
))

Thanks in advance!
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Victormar , if you are using year week from DIM_Calendar it should display the one not having value. and Join between Date and Table should be single directional

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

I'd try to use the REMOVEFILTERS command, instead of ALL. I don't think ALL will remove the date filters on Table1, but maybe I'm worng.

CumulativeSum =
CALCULATE(
   SUM(Table1[hour]),
   REMOVEFILTERS(DIM_Calendar),
   'Dim_calendar'[Date] <= MAX('DIM_Calendar'[Date])
)

 

If this doesn't work, try showing items with no data : right-click on your measure in the visuals pane, and Show items with no data.

 

If this works, please consider accepting this as a solution if someone has the same problem in the future 🙂

thanks for your help!

The other solution worked 🙂

amitchandak
Super User
Super User

@Victormar , if you are using year week from DIM_Calendar it should display the one not having value. and Join between Date and Table should be single directional

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

thanks! I had the crossfilter direction set to both, now it works! Thanks you very much 🙂

 

Why is it that it doesn't work when having crossfilter set to both?

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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