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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
powerbidu
Frequent Visitor

write a calcaulated measure to identify blanks

I have created a table in Power BI that contains multiple columns. I would like to create a measure that returns "Yes" if any column in a row is blank, and "No" if all the columns are filled. Please note: The columns can change depending on which columns I select to include in the table.  

Results should follow the 'Exception' Column.
 
TradeDateTimeException?
123XXX Yes
124XXXYYYNo
125 YYYNo
126XXXYYYNo
127  Yes
 
Thank you in advance
 
 
1 ACCEPTED SOLUTION
mdaatifraza5556
Super User
Super User

Hi @powerbidu 

Can you please try the below DAX.

Exception =
SWITCH(TRUE(),
    ISBLANK(SELECTEDVALUE(Trade1[date])) || ISBLANK(SELECTEDVALUE(Trade1[time])), "Yes",
    "No"
)

Screenshot 2025-03-25 164311.png

 




If this answers your questions, kindly mark this as a solution.

View solution in original post

3 REPLIES 3
v-hashadapu
Community Support
Community Support

Hi @powerbidu , Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.

rohit1991
Super User
Super User

Hi @powerbidu ,
To create a measure in Power BI that dynamically checks if any column in a row is blank and returns "Yes" if so, or "No" if all are filled, you need to be mindful that measures do not evaluate row-by-row by default like calculated columns do. However, if you're working with a fixed set of known columns in your visual, you can create a custom DAX measure using conditional logic to check for blanks in each field. While it won’t respond dynamically to column visibility in the visual (since DAX measures must reference specific columns), you can still create a flexible measure that captures the most relevant fields and flags exceptions as needed. This measure can then be used in the “Exception?” column to identify rows that contain any missing values.

 

Exception? = 
IF (
    OR (
        ISBLANK(YourTable[Trade]),
        ISBLANK(YourTable[Date]),
        ISBLANK(YourTable[Time])
    ),
    "Yes",
    "No"
)

Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
mdaatifraza5556
Super User
Super User

Hi @powerbidu 

Can you please try the below DAX.

Exception =
SWITCH(TRUE(),
    ISBLANK(SELECTEDVALUE(Trade1[date])) || ISBLANK(SELECTEDVALUE(Trade1[time])), "Yes",
    "No"
)

Screenshot 2025-03-25 164311.png

 




If this answers your questions, kindly mark this as a solution.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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