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
pers
Frequent Visitor

Conversion of calculated column to Measure

Hello, I am new to DAX and Power BI. I am trying to convert a calculated column into a measure so that I am able to use the measure with slicers, as slicer does not work on calculated column (or maybe I am not aware).

 

The value of calculated field is based on checking the value of first column, and then computing using other two columns.

 

CalculatedColumn = IF(AND(Table[Account]>"111111", Table[Account]<"222222"),-Table[D]+Table[C],Table[D]-Table[C])

 

I am not able to convert this into a measure. Any help/ direction is highly appreciated.

 

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

Hi @pers 

Try this measure

MEASURE =
IF (
    AND ( MAX ( Table[Account] ) > "111111", MAX ( Table[Account] ) < "222222" ),
    - MAX ( Table[D] ) + MAX ( Table[C] ),
    MAX ( Table[D] ) - MAX ( Table[C] )
)

Best Regards

Maggie

 

Community Support Team _ Maggie 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

4 REPLIES 4
Anonymous
Not applicable

I have a similar issue...

 

jenanon_0-1634229856504.png

 

Basically want to convert this calculated column into a measure.

 

Tried using 

 

Delivered Savings Measure =
VAR DelStatus = SELECTEDVALUE('Table 1'[Stage of Delivery])
Return

SWITCH(TRUE(),
DelStatus = "Completed" , 'Table 1'[Estimated Overall Saving] ,
DelStatus <> "Completed", 'Table 1'[Saving Delivered to date]
)

 

But it didn't give me the right figures, is anyone able to help please?

 

Thanks 

v-juanli-msft
Community Support
Community Support

Hi @pers 

Try this measure

MEASURE =
IF (
    AND ( MAX ( Table[Account] ) > "111111", MAX ( Table[Account] ) < "222222" ),
    - MAX ( Table[D] ) + MAX ( Table[C] ),
    MAX ( Table[D] ) - MAX ( Table[C] )
)

Best Regards

Maggie

 

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

TCarrasquillo
Helper II
Helper II

I believe the measure would just look like this:   CalcColumnMeasure = Sum ( 'Table' [Calculated Column] ).

 

If you still want to do a measure 🙂

HotChilli
Super User
Super User

It's the other way round, slicers like calculated columns

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.