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
RP_OFaustino
Helper I
Helper I

Running Sum Bar Graph Displaying Months Without Values

HI PBI Community,

 

I have this Running Sum Bar and Line Graph:

RP_OFaustino_0-1690098088641.png

 

As you can see everything is fine in the column chart until June 2023. But for July to December, they are displaying the value of June.

Here is my code for the column:

 

 

Running Sum (Gross Leads) = 
CALCULATE(SUM('Overall Weekly Leads'[Counter]),
FILTER(ALL(
    'Date'[Date]),'Date'[Date] <= MAX('Date'[Date]) && 'Date'[Date] <=DATE(2023, 6, 30)))

 

 

is there anyway to hide the values from July onwards?

 

The target and total leads tables are connected to a date table.

 

I cannot filter it out by month because the higher-ups want to view the Target for the year.

 

Appreciate the help.

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

pls try this

Running Sum (Gross Leads) =
IF( MAX('Date'[Date]) <= DATE(2023, 6, 30),
CALCULATE(SUM('Overall Weekly Leads'[Counter]),
FILTER(ALL(
    'Date'[Date]),'Date'[Date] <= MAX('Date'[Date]) && 'Date'[Date] <=DATE(2023, 6, 30))))

View solution in original post

2 REPLIES 2
RP_OFaustino
Helper I
Helper I

Dear Sir @Ahmedx  a little tweak of the code and it works!

Running Sum (Gross Leads) = 
IF(MAX('Date'[Date]) <= DATE(2023,6,30),
CALCULATE(SUM('Overall Weekly Leads'[Counter]),
FILTER(ALL(
    'Date'[Date]),'Date'[Date] <= MAX('Date'[Date]) && 'Date'[Date] <=DATE(2023, 6, 30))),0)

Thank you!

Ahmedx
Super User
Super User

pls try this

Running Sum (Gross Leads) =
IF( MAX('Date'[Date]) <= DATE(2023, 6, 30),
CALCULATE(SUM('Overall Weekly Leads'[Counter]),
FILTER(ALL(
    'Date'[Date]),'Date'[Date] <= MAX('Date'[Date]) && 'Date'[Date] <=DATE(2023, 6, 30))))

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.