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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JamesK5613
New Member

Replace Datetime with BLANK, when another value is notblank

Hi All, 

 

I'm having trouble figuring out how get a value to show in a visual as needed. Example datatable is this 

 

ID DateTimeDelay/CancellationReason 
123/06/2023 10:00Delay                       Transport
224/06/2023 10:00 Blank                       Blank

 

I need the visual table to show only the 24/06/2023 date, but still have the other ID in so  

 

ID DateTimeDelay/CancellationReason 
1   
224/06/2023 10:00 Blank                       Blank

 

So if an ID has a DateTime with Blank, Blank, it is displayed in the visual, If however the Delay/Cancellation has either Delay or Cancellation as a value, then the datetime, delay/cancellation and reason would show as blank. 

 

This datatable is refreshed frequently with more rows daily. 

 

Thank you in advance!

1 REPLY 1
Sahir_Maharaj
Super User
Super User

Hello @JamesK5613,

 

Can you please try creating a new measure:

FilteredTable =
VAR SelectedDate = DATE(2023, 6, 24)  // Change the date as needed
RETURN
    IF(
        ISBLANK(MAX('Table'[Delay/Cancellation])) ||
        MAX('Table'[Delay/Cancellation]) = "Blank" &&
        MAX('Table'[DateTime]) = SelectedDate,
        MAX('Table'[ID]),
        BLANK()
    )

By adding the "FilteredTable" measure to your visual table, it should only show the rows where the date is equal to the selected date and the 'Delay/Cancellation' column has a value of "Blank" or is blank.

 

Do not hesitate to let me know if you might need further assistance.


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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