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
angelina_tr
Regular Visitor

Line chart

Hej, for some reason the curve shows the same values ​​for future months for which we have not yet entered data into the Excel. Even there are not even empty cells for this data 

 

In the second picture I applied a filter with the value show less than the number of beneficiaries from the last report. but then Power Bi hides the data for the last month of the report. (I want to see 1,089,988 as last reported data)

I tried to combine data equal to or less than the value, but still with the latest current figures a straight line comes out for future months that I want to hide. Maybe, you know the answer to what to do to hide the direct line for future months? I don't want to see the strikt line with no walue yet. And keep just one month shows the last reported number ? I would be grateful, if you tell any suggestions.
Screenshot 2024-03-08 085258.pngScreenshot 2024-03-08 085235.png

9 REPLIES 9
angelina_tr
Regular Visitor

Sorry, I did't get it ( 

In powerBi I have my formula like this: 

Running total =
VAR CurrentMonth = MAX ( 'Reach unique'[Month].[Date] )
RETURN
CALCULATE (
    SUM ( 'Reach unique'[Value] ),
    FILTER (
        ALLSELECTED ( 'Reach unique'[Month].[Date] ),
        'Reach unique'[Month].[Date] <= CurrentMonth
    )
)

I collect my database in Excel file and link it with PowerBi. And I make calculation total already in PowerBi program. I did't understend there I could add the new collumn as you discrubed in a massage. 

Do you have any saggestions how I could modify my formula ? 

Many thanks, 
Anhelina 
Anonymous
Not applicable

@angelina_tr  Why is your "VAR CurrentMonth" saving the maximum date instead of the current date?

Good question! I replase it with "today"
But now my curve looks like a line ande include future monthes. I have no idea why Screenshot 2024-03-11 091045.png
Anonymous
Not applicable

Can you create a year to date column in your date table like I suggested, and use a ytd = 1 filter in your expression to sum values?

No, because have my data in Excel. And reverse the monthesScreenshot 2024-03-11 095256.png

Screenshot 2024-03-11 100142.png
 
My data base in Excel look like this. I can't apply the logic with collunn that you suggested((
Maybe you have some suggestion how I can do it? Becouse my monthes in is one line, like a titels, it's not a collumn. 

I reverse to colluns it's already in PowerBI 
Anonymous
Not applicable

If you unpivoted the date columns, you should be able to create this calculated column within your table:

ytd_dates =
IF (
[Month] <= TODAY (),
1,
0
)

I changed my time zone to USA and it helps before. (I am localy in Europe) 

And curves shows future munthes also now. As it was
Anonymous
Not applicable

@angelina_tr  This approach will display Sales, for example, only up until the year to date:

Create a ytd_dates column in your date table (or data table depending on your model):

 
ytd_dates =
IF (
    [Month] <= TODAY (),
    1,
    0
)


Then create a YTD Sales measure (or Cumulative reach measure in your case):

YTD Sales =
CALCULATE (
    TOTALYTD ( SUM ( Sheet1[Sales] ), Sheet1[Month], "12/31" ),
    KEEPFILTERS ( Sheet1[ytd_dates] = 1 )
)

 

bchager6_2-1709994756422.png

 

 

 

 

 

 

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.