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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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