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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jsha
Frequent Visitor

How to get rid of straight line after today () in line chart based on measures

Hello

I have a document table which contains about 25 000 documents. This table contains columns for planned issue dates and actual issue dates.

 

My goal is to build a line chart with one line for number of planned document issues and one line for number of actual documents issued (sliceable on discipline).

 

This is what I have done so far:

1. Made separate date table

2. Set relationships between original document table and date table (planned issue date & date) (active)

3. Set relationships between original document table and date table (actual issue date & date) (inactive)

4. Made measure for count of planned issues per day in date table (CALCULATE/COUNTA/ALLSELECTED)

5. Made measure for count of actual issues per day in date table (CALCULATE/COUNTA/USERELATIONSHIP/ALLSELECTED)

6. Made measure for running total of the planned issues in step 4 (CALCULATE/SUMX/FILTER/ALLSELECTED/ISONORAFTER)

7. Made measure for running total of the actual issues in step 5 (CALCULATE/SUMX/USERELATIONSHIP/FILTER/ALLSELECTED/ISONORAFTER)

 

The problem is that I cannot get my running total actual curve (step 7) to end at today(). If sentence involving today() and blank () will not do the trick.

 

Any suggestions?

 

Capture.JPG

 

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @jsha

After my research, you may try to improve your formula as below:

actual = var _maxdate=IF(CALCULATE(MAX(Table1[Date]))<=TODAY(),MAX(Table1[Date]),BLANK()) return

CALCULATE(SUMX(Table1,[Sales]),FILTER(ALLSELECTED(Table1[Date]),ISONORAFTER(Table1[Date],_maxdate,DESC))) 

Result:

8.JPG

 

Best Regards,
Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @jsha

After my research, you may try to improve your formula as below:

actual = var _maxdate=IF(CALCULATE(MAX(Table1[Date]))<=TODAY(),MAX(Table1[Date]),BLANK()) return

CALCULATE(SUMX(Table1,[Sales]),FILTER(ALLSELECTED(Table1[Date]),ISONORAFTER(Table1[Date],_maxdate,DESC))) 

Result:

8.JPG

 

Best Regards,
Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Excellent. Thank you!

 

Capture.JPG

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors