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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Elscc
Helper I
Helper I

EXACT function not working with calculated column

I have a table with a text column, and a calculated column which is derived from a measure. The measure is calculating text values from data in a related table. 

 

End result is one table with two text columns with similar text data. 

 

StandardTextColumnCalculatedTextColumn
ValueAValueA
ValueBValueD
ValueCValueB
ValueDValueD

 

I want to highlight where the values do not match.

When comparing the columns, a false outcome is always produced. 

StandardTextColumn = CalculatedTextColumn = False

EXACT(StandardTextColumn,CalculatedTextColumn) = False

 

StandardTextColumnCalculatedTextColumnExpected ResultActual Result
ValueAValueATrueFalse
ValueBValueDFalseFalse
ValueCValueBFalseFalse
ValueDValueDTrueFalse

 

I have checked data types and tried using CONVERT/TRIM to enure both are text data. 

I have tested with other standard text columns within the same table and it works, so it seems to be from the interaction with the calculated text column. 

 

Any help is appreciated. 

4 REPLIES 4
Shalini_T
Frequent Visitor

@Elscc Can you just share the sample formula which you have used to create a measure and calculated column ?
What is the relationship between text table and related table?

Regards,

Shalini

Hi,

Please see my other reply for the measure and calculated column formula. My DIM_C and Episode tables have a 1-1 active relationship. 

 

Many thanks in advance for any help.

audreygerred
Super User
Super User

Can you share the DAX that you have for your measure and calculated column?





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

Proud to be a Super User!





Measure:
Status =
VAR _Status =
IF (
MAX(DIM_C[ID]) IN SELECTCOLUMNS(
CALCULATETABLE(RELATEDTABLE('Episodes'),
('Episodes'[Date Final Plan Issued]<=TODAY() && NOT(ISBLANK('Episodes'[Date Final Plan Issued]))) &&
('Episodes'[Date Episode End]>TODAY() || ISBLANK('Episodes'[Date Episode End])))
,"ID",'Episodes'[ID]),"ValueA",
IF(MAX(DIM_C[ID]) IN SELECTCOLUMNS(
CALCULATETABLE(RELATEDTABLE('Episodes'),
('Episodes'[Date Episode Start]<=TODAY()) &&
(not(ISBLANK('Episodes'[Date of Request]))) &&
(ISBLANK('Episodes'[Date of Transfer])) &&
('Episodes'[Date Final Plan Issued]>TODAY() || ISBLANK('Episodes'[Date Final Plan Issued])) &&
('Episodes'[Date Episode End]>TODAY() || ISBLANK('Episodes'[Date Episode End])))
,"ID",'Episodes'ID]),"ValueB",BLANK()
))
RETURN
IF(ISBLANK(_Status),"ValueC",_Status)
 
CalculatedColum:
Status = CALCULATE(IF( ISBLANK([Status]),"ValueC",[Status]),ALLEXCEPT(DIM_C,DIM_C[ID]))
 
I get the same result using EXACT if I turn the measure into a calucated column like the following:
 
Status =
VAR _Status =
IF (
    DIM_C[ID] IN SELECTCOLUMNS(
        CALCULATETABLE(RELATEDTABLE('Episodes'),
        ('Episodes'[Date Final Plan Issued]<=TODAY() && NOT(ISBLANK('Episodes'[Date Final Plan Issued]))) &&
        ('Episodes'[Date Episode End]>TODAY() || ISBLANK('Episodes'[Date Episode End])),ALLEXCEPT(DIM_CIC,DIM_C[ID]))
        ,"ID",'Episodes'[ID]),"ValueA",
        IF(MAX(DIM_C[ID]) IN SELECTCOLUMNS(
        CALCULATETABLE(RELATEDTABLE('Episodes'),
            ('Episodes'[Date Episode Start]<=TODAY()) &&
            (not(ISBLANK('Episodes'[Date of Request]))) &&
            (ISBLANK('Episodes'[Date of Transfer])) &&
            ('Episodes'[Date Final Plan Issued]>TODAY() || ISBLANK('Episodes'[Date Final Plan Issued])) &&
            ('Episodes'[Date Episode End]>TODAY() || ISBLANK('Episodes'[Date Episode End])),ALLEXCEPT(DIM_C,DIM_C[ID]))
            ,"ID",'Episodes'ID]),"ValueB",BLANK()
        ))
RETURN
CALCULATE(IF(ISBLANK(_Status),"ValueC",_Status),ALLEXCEPT(DIM_C,DIM_C[ID]))
 
I hope this helps. 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors