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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Need help to solve Dax messure

Hello All,

 

I need  help to get solve a dax messure.

 

I have a column in my table as OFS/ONS which contain values as OFS and ONS.

and i have project id's in my table.

I am trying to filter the table using Project id.

 

now i am trying to show the project type as if the project is of type OFS and ONS or only ONS then show it as INTERNATIONAL,

If it is only OFS then show as NATIONAL,

 

I have tried the below calculated column but i am not getting the output as i need.

Capture.PNG

 

Can anyone suggest me how can i solve this.

 

Thanks in advance.

Mohan V

 

1 ACCEPTED SOLUTION
GilbertQ
Super User
Super User

Hi @Anonymous

 

What I would suggest doing is rather than trying to create the calculated column using DAX rather do it in the Query Editor and create a Custom Column.

 

You could then create it in your table 'Allocation Report' with the following code

 

if [Onsite/OffShore] = "ONS" and [Onsite/OffShore] = "OFS" then "International"
else if [Onsite/OffShore] = "OFS" and [Onsite/OffShore] <> "ONS" then "National"
else "Other"

 

 





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

Proud to be a Super User!







Power BI Blog

View solution in original post

2 REPLIES 2
GilbertQ
Super User
Super User

Hi @Anonymous

 

What I would suggest doing is rather than trying to create the calculated column using DAX rather do it in the Query Editor and create a Custom Column.

 

You could then create it in your table 'Allocation Report' with the following code

 

if [Onsite/OffShore] = "ONS" and [Onsite/OffShore] = "OFS" then "International"
else if [Onsite/OffShore] = "OFS" and [Onsite/OffShore] <> "ONS" then "National"
else "Other"

 

 





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

Proud to be a Super User!







Power BI Blog

SivaMani
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

It would be helpful if you share the sample data.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.