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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mario_ruiz
Helper II
Helper II

can I create a field in a table based on a Measure I created?

Hi,

 I have a measure that counts the total per account and works well when using it in a matrix as it was built for this purpose. 

 But I do need this same count to be part of a counting category, so I just tried to copy the measure code into a new column on the table but is not working in the same way. Is it related probably to the different context I have in the matrix visual than in the table context?

 

Thanks, 

 

MR

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @mario_ruiz ,

 

unfortunately it's no just copy and paste to create a calculated column based on the DAX that is used for a measure.
Indeed, this is due to the different context. A calculated column starts without a filter context but with a row context. A measure starts with a filter context. You can transform a row context by using CALCULATE this is called context transition, but you can not transform a filter context into a row context.
This does not mean that there never is a row context when creating a measure.

Nevertheless, you also have to be aware that a calculated column will only be "recalculted" during edit and a data refresh. This means the values will not change when users start interacting with the data.

Hopefully, this helps to tackle your challenge.

 

Regards,

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

1 REPLY 1
TomMartens
Super User
Super User

Hey @mario_ruiz ,

 

unfortunately it's no just copy and paste to create a calculated column based on the DAX that is used for a measure.
Indeed, this is due to the different context. A calculated column starts without a filter context but with a row context. A measure starts with a filter context. You can transform a row context by using CALCULATE this is called context transition, but you can not transform a filter context into a row context.
This does not mean that there never is a row context when creating a measure.

Nevertheless, you also have to be aware that a calculated column will only be "recalculted" during edit and a data refresh. This means the values will not change when users start interacting with the data.

Hopefully, this helps to tackle your challenge.

 

Regards,

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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