cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

issue with new column

Hi I have this query

 

Dept = Switch(SELECTEDVALUE(Delivery_transaction_details[posting_code]),
1,"Bulk",
2,"Bulk",
10,"Bulk",
99,"Bulk",
"Cyl")
 
new column Dept is created, but even thought Posting_code is 1, cell is populated as "Cyl"
 
any reason?
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

@salman_ali change to this

 

Dept = Switch(Delivery_transaction_details[posting_code],
1,"Bulk",
2,"Bulk",
10,"Bulk",
99,"Bulk",
"Cyl")

 

removed SELECTEDVALUE function

 

I would 💖 Kudos 🙂 if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation! 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

2 REPLIES 2
Highlighted
Super User IV
Super User IV

@salman_ali change to this

 

Dept = Switch(Delivery_transaction_details[posting_code],
1,"Bulk",
2,"Bulk",
10,"Bulk",
99,"Bulk",
"Cyl")

 

removed SELECTEDVALUE function

 

I would 💖 Kudos 🙂 if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation! 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

Highlighted
Helper III
Helper III

Thanks so much, that worked!!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors