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
Rsanjuan
Helper IV
Helper IV

Creating a measure with multiple conditions

I am looking to calculate # of bids, when Job Phase equals certain conditions.  How do we do it for more than one condition?

 

NumberofSales = Calculate(DISTINCTCOUNT(Master[Bid_Number__c]),Master[Job.Job_Phase__c]="closed")

 

For example, I want to include not only "closed" but "in process", "confirmed"

 

Thanks!

2 ACCEPTED SOLUTIONS

check that the calculated colum is working as expected. Without seeing more of the model its hard to see whats wrong. 

 

 

//if this is a solution please mark as such

// if this is a solution please mark as such. Kudos always appreciated.

View solution in original post

v-caliao-msft
Employee
Employee

Hi @Rsanjuan,

 

You can use the follow DAX expression to get your expected result.
Count = CALCULATE(DISTINCTCOUNT(Master[ID]),FILTER(ALL(Master),Master[Job.Job_Phase__c]="closed"||Master[Job.Job_Phase__c]="in process"||Master[Job.Job_Phase__c]="confirmed"))

 

Capture.PNG

 

 

Regards,

Charlie Liao

 

 

View solution in original post

23 REPLIES 23

thats becasuse you are putting "" around the 1 making it text not numeric. Swap out a SUM() for the distinct count and put the FILTER()

 

NoOfSales = Calculate(SUM(Master[Bid_Number__c]),FILTER(Master[ConditionSales])=1)

 

 

//If this is a solution please mark as such

// if this is a solution please mark as such. Kudos always appreciated.

@samdthompson

 

The dax expression works, but it is not returning a number.  It's returning a (blank)

 

 

check that the calculated colum is working as expected. Without seeing more of the model its hard to see whats wrong. 

 

 

//if this is a solution please mark as such

// if this is a solution please mark as such. Kudos always appreciated.

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.