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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
jmetf150
Helper I
Helper I

Modify DAX Formula to Include 2 Conditions

Total Orders by Vendor = 
Var OrdersPerVen='ZPSMGR'[Ven #]
Return
Countrows(
    filter(
        All('ZPSMGR'),OrdersPerVen='ZPSMGR'[Ven #]))

 

I am making a dashboard for on time delivery metrics.  I figured out how to countrows for only a certain ven number to see how many orders were recieved from that vendor.  Now I need to add another column with the same code but with an additonal condition/pararmeter (that may be the wrong term) that will show me only rows with that [Ven #] && were "On Time" from the [OTD] column.   

 

 

 

 

 

 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jmetf150 ,

If I understand correctly, the issue is that you want to modify formula to include multiple conditions.

You can modify the DAX formula to include the additional condition. Please try the following DAX formula and check if can solve your problem:

Total Orders by Vendor On Time = 
VAR OrdersPerVen = 'ZPSMGR'[Ven #]
RETURN
COUNTROWS(
    FILTER(
        ALL('ZPSMGR'),
        OrdersPerVen = 'ZPSMGR'[Ven #] && 'ZPSMGR'[OTD] = "On Time"
    )
)

 

Looking forward to your reply.

Best Regards,

Wisdom Wu

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @jmetf150 ,

If I understand correctly, the issue is that you want to modify formula to include multiple conditions.

You can modify the DAX formula to include the additional condition. Please try the following DAX formula and check if can solve your problem:

Total Orders by Vendor On Time = 
VAR OrdersPerVen = 'ZPSMGR'[Ven #]
RETURN
COUNTROWS(
    FILTER(
        ALL('ZPSMGR'),
        OrdersPerVen = 'ZPSMGR'[Ven #] && 'ZPSMGR'[OTD] = "On Time"
    )
)

 

Looking forward to your reply.

Best Regards,

Wisdom Wu

 

That worked.  Thank you.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.