cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bhmiller89 Helper V
Helper V

Writing a Condition

Here's a snapshot of my data: Capture.JPG

 

I need a way to say whether or not an OrganizationName is considered CSP (IsCSP= CSP). However, each JobNum has multiple RateDesc, some rates are CSP and some aren't. I want to write a column or measure or something that say "If at least one RateDesc= "CSP", then this OrganizationName is CSP.  I need the OrganizationName as a whole to be considered CSP or NotCSP

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Writing a Condition

Hi @bhmiller89,

 

From your description, I create some sample data, you can create calculated columns like below:

 

IsCSPNew = IF('Table3'[IsCSP]="CSP",1,0)

 

OrgName = IF(CALCULATE(SUM(Table3[IsCSPNew]),ALLEXCEPT(Table3,'Table3'[TSMDepartment],'Table3'[OrganizationName],'Table3'[Domain Name],'Table3'[JobNum])),
                      "CSP",
                      "NotCSP"
                  )

 

e1.PNG

 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Super User III
Super User III

Re: Writing a Condition

Hi @bhmiller89,

 

You can try the CONTAIN formula to have a measure that does that classification:

 

Measure = IF(
                     CONTAINS(
                                      Table,
                                      Table[IsCSP];
                                      "CSP");
                      "CSP";
                      "NotCSP"
                  )

Regards,

MFElix


Regards

Miguel Félix


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

Proud to be a Datanaut!

Check out my blog:

Power BI em Português





anupampandey Helper III
Helper III

Re: Writing a Condition

@bhmiller89,

 

Could you share some sample please?

 

 

Thanks,

Anupam

Community Support
Community Support

Re: Writing a Condition

Hi @bhmiller89,

 

From your description, I create some sample data, you can create calculated columns like below:

 

IsCSPNew = IF('Table3'[IsCSP]="CSP",1,0)

 

OrgName = IF(CALCULATE(SUM(Table3[IsCSPNew]),ALLEXCEPT(Table3,'Table3'[TSMDepartment],'Table3'[OrganizationName],'Table3'[Domain Name],'Table3'[JobNum])),
                      "CSP",
                      "NotCSP"
                  )

 

e1.PNG

 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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