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! Request now

Reply
Khurram_Ahmed
Frequent Visitor

Using a column as an expression in a measure.

Hi, I have a table (live connected so can't create columns and tables), for the sake of explanation my table is like this:

 

 A                                     B

abc                                date1

abs                                date2

acs                              <blank>

asd                              <blank>

 

I want to add another column (C) to this table based on whether B is blank or not. So it should look like this:

 

 A                                     B                                     C

abc                                date1                              True

abs                                date2                              True

acs                              <blank>                            False

acb                              <blank>                           False

 

 

I tried using the if statement but can't use a column as an expression. I am new to DAX so any help is appreciated.

3 REPLIES 3
johnt75
Super User
Super User

You could create a measure like

C = NOT( ISBLANK( SELECTEDVALUE('Table'[B]) ) )

The key is that you cannot use just a column reference in a measure, as it does not know which row you are talking about. You need to use an aggregation function like MIN, MAX etc, or use SELECTEDVALUE to get the value from the current filter context.

It is not producing the intended result, many rows with dates are also showing false flag.

Presumably you are using column A on the visual with the measure. Does column A contain unique values or does it have duplicates? If it has duplicates then you will need to use a different column, or combination of columns, which can uniquely identify a row in the base table.

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