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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
AWentzEco
Frequent Visitor

Learning DAX Calculated Column versus Measure

Can someone explain how I could get this measure to work? I can easily create a calculated column with the correct values but I can't create a Measure. I'm guessing I don't have the correct expression. 

 
MEASURE: (Does not work - every values comes in as "Project Manager")
Project Role = IF(SELECTEDVALUE('PowerSteering_Projects-PBI_-_Metric_Collection_ROI'[EE Role]) = "Black Belt", "Black Belt", IF(SELECTEDVALUE('PowerSteering_Projects-PBI_-_Metric_Collection_ROI'[EE Role]) = "Green Belt", "Green Belt","Project Manager"))
 
 
CALCULATED COLUMN: (This works, and I can see the values for each row in the table.)
Project Role1 = IF('PowerSteering_Projects-PBI_-_Metric_Collection_ROI'[EE Role] = "Black Belt","Black Belt",IF('PowerSteering_Projects-PBI_-_Metric_Collection_ROI'[EE Role] = "Green Belt", "Green Belt","Project Manager"))
 
The column in the Table is called EE Role.
Basically:
IF EE Role = Black Belt, then Black Belt
IF EE Role = Green Belt, then Green Belt
ELSE = Project Manager

 

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @AWentzEco ,

 

Your formula seems good. We should put a measure in a visual where there are many contexts. It should be like below in your example.

[EE Role]    [Measure]

 

 

Best Regards,

Community Support Team _ Dale
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
v-jiascu-msft
Employee
Employee

Hi @AWentzEco ,

 

Your formula seems good. We should put a measure in a visual where there are many contexts. It should be like below in your example.

[EE Role]    [Measure]

 

 

Best Regards,

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

Thanks. I did that and now both the Measure and Calculated column are coming up with the correct values (both are the same). Perhaps it was a 'Friday' issue. Smiley Very Happy

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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