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! Learn more

Reply
Anonymous
Not applicable

Showing Zero and blank() on line chart(with timeline) on X-Axis with condition today()

Hi,

Having an issue in showing zeros if there is no value until today() and afterwards it should show blank() on the line chart. 

I am counting no. of travels using count function but for last two month there was no travel due to corona situation and hence no data in the database and it shows blank.

I would like to replace blanks() before today() on the timeline

 

POWER BI.PNG.

Thanks//Jayant

 
1 ACCEPTED SOLUTION

Hi @Anonymous ,

Maybe you could try like this:

No.of Site Travel =
IF (
    MAX ( 'Date'[Date] ) >= TODAY (),
    BLANK (),
    COUNTA ( 'SERT3 Site work'[Site Travel] ) + 0
)

4.PNG

 

Best Regards,
Xue Ding
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

5 REPLIES 5
vanessafvg
Super User
Super User

you can use an if( isblank

 

example

 

set blank to 0 =
IF (
ISBLANK ( 'CalculatedMeasures'[PreviousYearTotalSales] ),
0,
( 'CalculatedMeasures'[Total Sales] )
)





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

Thanks for the reply.

But as I have shown in attached picture.

Data is available till Mar-2020 and today it is May-2020. so I would like to show from Mar-2020 to May-2020 as zero value rather then blank and after May-2020 it should be blank.

 

 

Anonymous
Not applicable

 

Looking for results as shown in picture.

POWER BI.PNG

 

Hi @Anonymous ,

Maybe you could try like this:

No.of Site Travel =
IF (
    MAX ( 'Date'[Date] ) >= TODAY (),
    BLANK (),
    COUNTA ( 'SERT3 Site work'[Site Travel] ) + 0
)

4.PNG

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

well you can always use your if statement to show blank for values greater than your current date by using blank()





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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