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
kadingo
Helper II
Helper II

Check if column value is null or blank in DAX

tttt.jpg

I have the sample DAX query above. Is there away i can manipulate 'Target_FormResponse'[Area Used] such that if it is blank or empty, i return "No" otherwise if its not blank or empty i return "Yes".

 

In SSRS, i can do something like =IIF(Len(Fields!Form_Response.Value) > 0,"Yes","No") but i want to achieve this at the DAX query level.

 

On a different but related note, is there also away i can get only the time part (exclude the date) from an SSAS datetime column in the sample DAX query above?

 

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

Hi @kadingo ,

 

We can use the following DAX to meet your requirement:

 

Table =
ADDCOLUMNS (
    FILTER (
        SUMMARIZE (
            NATURALLEFTOUTERJOIN ( 'Target_Category', 'Target_Form' ),
            'Target'[Area],
            'Target'[id],
            'Target'[Target date],
            'Target'[Target Time Rage],
            'Target_Category'[Origin],
            'Target_Category'[Sectotion],
            'Target'[Location],
            'Target_Category'[Ethencity],
            'Target_FormResponse'[Area Used],
            'Target'[Description]
        ),
        'Target'[id] = 111373268
    ),
    "Area Used Column", IF ( ISBLANK ( [Area Used] ), "No", "Yes" )
)

 

We can try to use the Time Value function to get the time part of a Date/Time column

 

Time = TimeValue([Date])


Best regards,

 

Community Support Team _ Dong Li
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-lid-msft
Community Support
Community Support

Hi @kadingo ,

 

We can use the following DAX to meet your requirement:

 

Table =
ADDCOLUMNS (
    FILTER (
        SUMMARIZE (
            NATURALLEFTOUTERJOIN ( 'Target_Category', 'Target_Form' ),
            'Target'[Area],
            'Target'[id],
            'Target'[Target date],
            'Target'[Target Time Rage],
            'Target_Category'[Origin],
            'Target_Category'[Sectotion],
            'Target'[Location],
            'Target_Category'[Ethencity],
            'Target_FormResponse'[Area Used],
            'Target'[Description]
        ),
        'Target'[id] = 111373268
    ),
    "Area Used Column", IF ( ISBLANK ( [Area Used] ), "No", "Yes" )
)

 

We can try to use the Time Value function to get the time part of a Date/Time column

 

Time = TimeValue([Date])


Best regards,

 

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

Try

IF(not(isblank(Target_FormResponse'[Area Used])),"Yes","No") 

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.

Top Solution Authors