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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.