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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
cons_austria03
New Member

Running Total Zero

I have a very simple measure but the latest month is displaying zero since I have not added anything new for the latest month. In this scenario how can I get the value from last month instead of displaying zero?

 

Measure below: 

Running Total =CALCULATE([Discovered Servers],FILTER(ALL(chargeableserverstrendreport), chargeableserverstrendreport[Discovery Date] <= MAX (chargeableserverstrendreport[Discovery Date])))

 

chargeableserverstrendreport has a relationship with my date table and display running total per month using the month field from the date table

 

My data below, I need the Running Total for Feb2023 to show 9 instead of zero

 

MonthCountRunning Total (what I'm getting)Running Total (what I need)
Oct2022111
Nov2022344
Dec2022377
Jan2023299
Feb2023009
Total999

 

1 REPLY 1
andhiii079845
Super User
Super User

[Discovered Servers] is a measure, right? I miss a sumx or something in the caluclate function.
You can try this:

Running Total =
Var _discover =  [Discovered Servers]
Var _function = 
CALCULATE([Discovered Servers],FILTER(ALL(chargeableserverstrendreport), chargeableserverstrendreport[Discovery Date] <= MAX (chargeableserverstrendreport[Discovery Date])))
RETURN if(_discover=0,0,_function)

 





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

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors