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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
anandmitta
Helper I
Helper I

Replace blank values with "Null" keyword using measure

Hi,

 

I have a table visual with contains many date/time rows and columns.

 

anandmitta_0-1641237861642.png

 

There are many blank values in the table. Is it possible to replace all the blank values in the visual with text: "Null".

Can this be achieved with a measure rather than replacing the blank with "Null" in power query?

Can we replace the blank values in all columns in the table visual using a single measure rather than using multiple measures for multiple columns?

 

 

Any help would be appreciated.

Thank You

1 ACCEPTED SOLUTION

Note that if the measure here doesn't return text values, then you may get an error about IF returning different data types. You can fix this by wrapping the measure with FORMAT. and specifying the format you'd like (e.g. "General Date" or "yyyy-mm-dd" or "c" etc).

View solution in original post

8 REPLIES 8
v-rongtiep-msft
Community Support
Community Support

Hi @anandmitta ,

It seems you are using Live Connection mode. It means you  can only make changes to it on the Desktop. So it seems that you can only use measures or use calculate table.

Please have a try.

11.PNG

NewTable = 
VAR midT =
ADDCOLUMNS (
'Table',
"Date_", IF(ISBLANK('Table'[date]),"NULL",FORMAT('Table'[date],"YYYY-mm-dd")),
"Start_",IF(ISBLANK('Table'[start]),"NULL",FORMAT('Table'[start],"YYYY-mm-dd")))
RETURN
SELECTCOLUMNS ( midT, "Date", [Date_], "Start", [Start_] )

22.PNG

 

Best Regards

Community Support Team _ Polly

 

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

 

Ashish_Mathur
Super User
Super User

Hi,

Replacing in the same columns can only be done in the Query Editor. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ALLUREAN
Solution Sage
Solution Sage

Hi, @anandmitta 

Try something like:

Measure = IF(ISBLANK(Table[Date]), "Null", Table[Date])

 

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA

https://www.linkedin.com/company/77757292/




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




When I use the ISBLANK() function and trying to select a column in the ISBLANK function, it's throwing error. 

This is strange, can you share what is the error?




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




anandmitta_0-1641238757793.png

 

It's asking for aggregate value to use in the ISBLANK() function

If you use a measure in your table you can use it:

Measure = IF(ISBLANK([MeasureinTable]), "Null", [MeasureinTable])




Did I answer your question? Mark my post as a solution!


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




Note that if the measure here doesn't return text values, then you may get an error about IF returning different data types. You can fix this by wrapping the measure with FORMAT. and specifying the format you'd like (e.g. "General Date" or "yyyy-mm-dd" or "c" etc).

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.