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 September 15. Request your voucher.

Reply
shahina14
Microsoft Employee
Microsoft Employee

How do I pass my new measure value in calculated column through dax ?

I am trying to pass my new measure value which i have created .
That measure i am trying to pass while creating calculated column , but unfortunately the measure value is not retrieved.
Ex : measure_A = year(today()) - 3
ans = 2018

Newcolumn_A = switch(true(),
year('sample'[timePeriod])<[measure_A],0,1)

///where timeperiod is a column in my table.

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @shahina14,

You cannot pass a measure into a calculated column, as calculated columns are evaluated at data refresh time, whereas measures are evaluated as a result of user interaction within a report. Put simply: the value of a measure is not really known when a calculated column is evaluated.

This article by Marco Russo (specifically the Choosing between calculated columns and measures section) is a very detailed deep-dive on the concepts and may help clarify further (as well as provide you with knowledge on how you may be able to approach your challenge differently).

In terms of any follow-up and how to solve, you may get better traction by posting a question in the DAX or Desktop forums, as these have a lot more users with DAX-specific knowlegde and you are more likely to receive faster and more targeted assistance.

Good luck,

Daniel





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

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

1 REPLY 1
dm-p
Super User
Super User

Hi @shahina14,

You cannot pass a measure into a calculated column, as calculated columns are evaluated at data refresh time, whereas measures are evaluated as a result of user interaction within a report. Put simply: the value of a measure is not really known when a calculated column is evaluated.

This article by Marco Russo (specifically the Choosing between calculated columns and measures section) is a very detailed deep-dive on the concepts and may help clarify further (as well as provide you with knowledge on how you may be able to approach your challenge differently).

In terms of any follow-up and how to solve, you may get better traction by posting a question in the DAX or Desktop forums, as these have a lot more users with DAX-specific knowlegde and you are more likely to receive faster and more targeted assistance.

Good luck,

Daniel





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

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.