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
Anonymous
Not applicable

Convert Simple Calculated Column Dax to Calculated Measure Dax

 

Table:

Olajumi_0-1656463227742.png

 

I created a Calculated Column as

 
Friendly BillAgentName =
IF('Bill agent'[billAgentName]="AP Green", "Green", IF('Bill agent'[billAgentName] = "AEP", "Ada Eco Plural"))
 
I will like to use a calculated measure instead of a Calculated column because I need to improve on perfromance of my Tabular Model.

 

Here is the anticipated result.

 

Result:

 

Olajumi_1-1656463262608.png

 

Can I have the Dax for the Calculated measure to accomplish same requirement?

 

 

 

 

1 ACCEPTED SOLUTION
Seanan
Solution Supplier
Solution Supplier

Hi @Anonymous 

Please try this:

Switch = SWITCH(TRUE(),MAX('Table'[Names]) = "AP Green","Green",MAX('Table'[Names]) = "AEP","Ada Eco Plural")

Then if you have any values that return blank in the measure then enable "show items with no data"

NVIDIA_Share_ShI5pebLLP.pngNVIDIA_Share_cqEeNmvRPl.png

 

 

 

Kind regards,
Seanan
If this post helped, please consider accepting it as the solution.

View solution in original post

1 REPLY 1
Seanan
Solution Supplier
Solution Supplier

Hi @Anonymous 

Please try this:

Switch = SWITCH(TRUE(),MAX('Table'[Names]) = "AP Green","Green",MAX('Table'[Names]) = "AEP","Ada Eco Plural")

Then if you have any values that return blank in the measure then enable "show items with no data"

NVIDIA_Share_ShI5pebLLP.pngNVIDIA_Share_cqEeNmvRPl.png

 

 

 

Kind regards,
Seanan
If this post helped, please consider accepting it as the solution.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Users online (234)