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
Anonymous
Not applicable

Convert measure into a column

Hi 🙂 Is it possible to convet this measure into a column? 

 

Total depth = ((
var _stepno = SELECTEDVALUE('DM_WELL_PLAN_OP'[step_no])
return
IF(
_stepno=0,
SELECTEDVALUE('DM_WELL_PLAN_OP'[md_to]),
LOOKUPVALUE('DM_WELL_PLAN_OP'[md_to],'DM_WELL_PLAN_OP'[step_no],_stepno+0)
))+SUM(CD_DATUM[datum_elevation]))*(-1)*0.3048
8 REPLIES 8
Anonymous
Not applicable

Hi @Anonymous ,

 

I could not know the result you want based on a single measure. Please upload some data samples and expected output.

Last but not least! Please do mask sensitive data before uploading.Thanks.

 

Best regards,

Eyelyn Qin

amitchandak
Super User
Super User

@Anonymous , As you are using a slicer value. It will not respond to the changes in the slicer. Only the first value will be taken while creating the column. I think not possible.

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
Anonymous
Not applicable

hi @amitchandak thank you for the comment! Possible to find a workaround? 

 

@Anonymous , leave it like measure use "values", or summarize to put a context. 

 

example

 

sumx(Values(Table[User]),distinctCOUNT(Table[category]))
sumx(summarize(Table,Table[User],"_1",distinctCOUNT(Table[category])),[_1])

 

 

example - https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Difference-Across/ba-p/934397#M451

https://www.youtube.com/watch?v=My0bLn9voo4

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
az38
Community Champion
Community Champion

Hi @Anonymous 

try smth like

Total depth = 
var _stepno = 'DM_WELL_PLAN_OP'[step_no]
var _tmp = 
IF(
_stepno=0,
'DM_WELL_PLAN_OP'[md_to],
LOOKUPVALUE('DM_WELL_PLAN_OP'[md_to],'DM_WELL_PLAN_OP'[step_no],_stepno+0)
)

return

_tmp 
+
SUM(CD_DATUM[datum_elevation]))*(-1)*0.3048

 

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Hi @az38 thanks! but get this error message:

A table of multiple values was supplied where a single value was expected.

az38
Community Champion
Community Champion

@Anonymous 

I think it's because one (or all) of mentioned fields in statement is a measure that should be rewrtitten also


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

@az38 checked, they all are regular columns.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors