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, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
October NL Carousel

Fabric Community Update - October 2024

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