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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
U156531
Helper III
Helper III

Setting calculated column equal to a measure

I have a measure and a calculated column in the same query. I set the calculated column equal to the measure but when I display the Calculated column in a visual it is blank even though the measure has a value. How can I get the calculated column to contain the same value as the measure? I've placed the example below.

 

Table1[CalcColumn] = Table1[Measure]                     

1 ACCEPTED SOLUTION

I think I found the resolution. I set another measure equal to the column using the sum function. I was then able to use the two measures in the calculation instead of a measure and a column. I'm sure there is a better way to do this but this works for now.

View solution in original post

4 REPLIES 4
nsexton12
Resolver II
Resolver II

Could you provide the code that you have in the measure? My first inclination would be to copy that code into the calculated column instead of just referencing the measure.

Measure =
CALCULATE(
     'Table1'[sumQuantity],
     'Table1'[DateReceived] <> " ")
 
The sumQuantity is a measure and the DateRecieved is a column. 
If I try to use this Measure in the calculation of another measure where I add it to a column I get the error that its not allowed. That is why I was trying to set a calculatedcolumn equal to the measure so that I could use the calculated column in place of the measure.

Are you wanting to have the same value in every row of the calculated column? Or do you want the calculated column to just show 0 if there is no date received? 

A screenshot of your data table/expected outcome would also be great!

I think I found the resolution. I set another measure equal to the column using the sum function. I was then able to use the two measures in the calculation instead of a measure and a column. I'm sure there is a better way to do this but this works for now.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.