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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
manish_tripathi
Frequent Visitor

Count with multiple conditions

I have a table where i have User email (as text), Bidstatus (as text) and Bid created date (in Datetime format)

 

where i am counting the interviewed talent using the following measure

 

Interviewed Talent =
CALCULATE(
    COUNTA('Bids made by MT'[BidStatusName]),
    'Bids made by MT'[BidStatusName] = "Back Out" ||
    'Bids made by MT'[BidStatusName] = "Credentialing" ||
    'Bids made by MT'[BidStatusName] = "Interview Rejected" ||
    'Bids made by MT'[BidStatusName] = "Interview Pending"||
    'Bids made by MT'[BidStatusName] = "Interview Scheduled"||
    'Bids made by MT'[BidStatusName] = "Customer Interview"||
    'Bids made by MT'[BidStatusName] = "On Billing"||
    'Bids made by MT'[BidStatusName] = "Drop" 
)
 
Now only for BidstatusName as "Drop" i want to count only those where bid date was prior to "nov 1, 2022" and count rest as they are
 
I tried modifying the DAX to following but it is not working:
 
Interviewed Talent =
CALCULATE(
    COUNTA('Bids made by HEB'[BidStatusName]),
    'Bids made by HEB'[BidStatusName] = "Back Out" ||
    'Bids made by HEB'[BidStatusName] = "Credentialing" ||
    'Bids made by HEB'[BidStatusName] = "Interview Rejected" ||
    'Bids made by HEB'[BidStatusName] = "Interview Pending"||
    'Bids made by HEB'[BidStatusName] = "Interview Scheduled"||
    'Bids made by HEB'[BidStatusName] = "Customer Interview"||
    'Bids made by HEB'[BidStatusName] = "On Billing"||
    ('Bids made by HEB'[BidStatusName] = "Drop" && 'Bids made by HEB'[Created]<"2022-11-01")
)
 
can you please suggest a possible solution
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@manish_tripathi , Try like

 

Interviewed Talent =
CALCULATE(
COUNTA('Bids made by HEB'[BidStatusName]),filter('Bids made by HEB' ,
'Bids made by HEB'[BidStatusName] in { "Back Out", "Credentialing","Interview Rejected" ,"Interview Pending", "Interview Scheduled", "Customer Interview", "On Billing", "Drop" }&& 'Bids made by HEB'[Created]< date(2022,11,01) )
)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

2 REPLIES 2
manish_tripathi
Frequent Visitor

Thank you @amitchandak however the second condition i want to apply only for drop status and not the rest, is there a way to do that as well

amitchandak
Super User
Super User

@manish_tripathi , Try like

 

Interviewed Talent =
CALCULATE(
COUNTA('Bids made by HEB'[BidStatusName]),filter('Bids made by HEB' ,
'Bids made by HEB'[BidStatusName] in { "Back Out", "Credentialing","Interview Rejected" ,"Interview Pending", "Interview Scheduled", "Customer Interview", "On Billing", "Drop" }&& 'Bids made by HEB'[Created]< date(2022,11,01) )
)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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