Forum Discussion
RP_OFaustino
3 years agoHelper I
Running Sum Bar Graph Displaying Months Without Values
HI PBI Community,
I have this Running Sum Bar and Line Graph:
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.
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))))
2 Replies
- AhmedxSuper 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)))) - RP_OFaustinoHelper 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!