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
KatsuKun
New Member

Measure Creation, Column does not exist

Hi all,

 

I'm having some trouble getting a measure to pick up a column. I'm wanting to convert my Duration Minutes to hh:mm. 

Getting the below error, which seem to suggest there is something wrong with my Duration column. I've been able to use it in the reporting without problem, but can't use it in a measure.

 

Any help would be appriciated

 

image.png

2 ACCEPTED SOLUTIONS
SamWiseOwl
Super User
Super User

Hi @KatsuKun 

In measures, columns always have to be in a function.

SelectedValue(table[Column]) lets you return a single value IF that column is being used in the visual.

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

View solution in original post

Anonymous
Not applicable

Hi @KatsuKun ,

Based on my testing, if creating a measure to display time, you need to use function to get the column values.

Measure = 
var _duration = SELECTEDVALUE('Table'[Duration Minutes])
VAR Hours = INT(_duration / 60)
VAR Minutes = MOD(_duration, 60)
RETURN 
FORMAT(Hours, "00") & ":" & FORMAT(Minutes, "00")

vjiewumsft_0-1723010223533.png

If you want to create a new column to display the time, using your writing dax can success.

vjiewumsft_3-1723010322084.png

Column = 
VAR Hours = INT([Duration Minutes] / 60)
VAR Minutes = MOD([Duration Minutes], 60)
RETURN
FORMAT(Hours, "00") & ":" & FORMAT(Minutes, "00")

vjiewumsft_2-1723010313653.png

You can also view the following documents to learn more information.

Measures in Power BI Desktop - Power BI | Microsoft Learn

Tutorial: Create calculated columns in Power BI Desktop - Power BI | Microsoft Learn

SELECTEDVALUE function - DAX | Microsoft Learn

 

Best Regards,

Wisdom Wu

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

2 REPLIES 2
Anonymous
Not applicable

Hi @KatsuKun ,

Based on my testing, if creating a measure to display time, you need to use function to get the column values.

Measure = 
var _duration = SELECTEDVALUE('Table'[Duration Minutes])
VAR Hours = INT(_duration / 60)
VAR Minutes = MOD(_duration, 60)
RETURN 
FORMAT(Hours, "00") & ":" & FORMAT(Minutes, "00")

vjiewumsft_0-1723010223533.png

If you want to create a new column to display the time, using your writing dax can success.

vjiewumsft_3-1723010322084.png

Column = 
VAR Hours = INT([Duration Minutes] / 60)
VAR Minutes = MOD([Duration Minutes], 60)
RETURN
FORMAT(Hours, "00") & ":" & FORMAT(Minutes, "00")

vjiewumsft_2-1723010313653.png

You can also view the following documents to learn more information.

Measures in Power BI Desktop - Power BI | Microsoft Learn

Tutorial: Create calculated columns in Power BI Desktop - Power BI | Microsoft Learn

SELECTEDVALUE function - DAX | Microsoft Learn

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

SamWiseOwl
Super User
Super User

Hi @KatsuKun 

In measures, columns always have to be in a function.

SelectedValue(table[Column]) lets you return a single value IF that column is being used in the visual.

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

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