cancel
Showing results for 
Search instead for 
Did you mean: 
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

Accepted Solutions
Super User IV
Super User IV

Re: Need help to solve Dax messure

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
SivaMani Solution Sage
Solution Sage

Re: Need help to solve Dax messure

Hi @Anonymous,

 

It would be helpful if you share the sample data.

Super User IV
Super User IV

Re: Need help to solve Dax messure

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

Helpful resources

Announcements
‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors