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

Can anybody tell me the DAX to add only particular values of a field in new calculated column?

PS : I am working on direct query mode so don't have access to the Power Query

 

I want only 3 particular values (by name) in new calculated column. example- "apac", "emea", "usca"

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@shivam , There is a limitation  not type of operation you can to in direct query for column

 

You can try three new columns, simple if, may work

 

example

if [Region] = "apac" then [column]



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s || 50+Power Query List Functions : Learn Power Query List
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

View solution in original post

2 REPLIES 2
amrans
Frequent Visitor

If you are using direct query with SQL Server, check if you can call a custom query to add required column logic in query.

amitchandak
Super User
Super User

@shivam , There is a limitation  not type of operation you can to in direct query for column

 

You can try three new columns, simple if, may work

 

example

if [Region] = "apac" then [column]



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s || 50+Power Query List Functions : Learn Power Query List
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Helpful resources

Announcements
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show episode 9

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 25

Ted's Dev Camp - August 25, 2022

Watch Session 25 of Ted's Dev Camp.

Top Solution Authors