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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AsalN
New Member

New Measure For Column Data Replacement

Hi, I have a column of data that specifies shift/crew A, B, or C for different manufactured products and I would like to create a New Measure to replace A, B, and C with 1, 2, and 3 instead. I used the following code:

 

NewMeasure =

SWITCH(

SELECTEDVALUE('RS'[Crew]),

"A", 1,

"B",2,

"C",3

)

 

The new measure doesn't seem to work. Can anybody help me with this please? Thanks.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

hHi @AsalN ,

There doesn't seem to be anything wrong with this Measure.

I have also created a column.

Column = SWITCH(RS[Crew],"A",1,"B",2,"C",3)

vrongtiepmsft_0-1689905208024.png

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

hHi @AsalN ,

There doesn't seem to be anything wrong with this Measure.

I have also created a column.

Column = SWITCH(RS[Crew],"A",1,"B",2,"C",3)

vrongtiepmsft_0-1689905208024.png

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

Ahmedx
Super User
Super User

Is this what you are looking for?

Screenshot_1.png

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.