Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello – How can I create a measure to show
If Product code = 10 return 30 or
If Product code = 12 return 50 or
If Product code = 13 return 70
Tabel Name = Sale
| Name | Branch | Product Code | (Measure) Add column and show the value in each row |
| ABC Intl | NYC | 10 | 30 |
| ZZZ Logistics | LON | 10 | 30 |
| ABC Intl | CAI | 12 | 50 |
| ZZZ Logistics | MEL | 12 | 50 |
| ABC Intl | DEL | 12 | 50 |
| ABC Intl | SHA | 13 | 70 |
| ABC Intl | NYC | 13 | 70 |
| ZZZ Logistics | NYC | 13 | 70 |
Solved! Go to Solution.
hi @gauravnarchal
you can use this measure you will get result
Hi, @gauravnarchal
Please check the below. The formula is for creating a new column.
New Column =
SWITCH ( Sale[Product Code], 10, 30, 12, 50, 13, 70 )
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
Hi, @gauravnarchal
Please check the below. The formula is for creating a new column.
New Column =
SWITCH ( Sale[Product Code], 10, 30, 12, 50, 13, 70 )
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
hi @gauravnarchal
you can use this measure you will get result
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!