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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors