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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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) )
)

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) )
)

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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