cancel
Showing results for
Did you mean:

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Frequent Visitor

## Would like to filter with multiple condition

I’m having customer aging report as sample attached.

The customer to be hold with following condition

• Any customer invoices open more than 30days to be hold
• And with “Dr” value also be hold

So in this scenario I’m getting filter in tradition excel

=IF(AND((TODAY()-C2>30),D2>0),"Hold","")

But how I can hold the customer invoices less than 30days where he has old invoices outstanding

In this scenario, the customer “COASTLINE INC” all the line items should be hold based on first and second condition

Kindly advice how I can performed the filter with multiple condition in DAX

1 ACCEPTED SOLUTION
Community Support

Hi  @Wasfiathhar ,

I created some data:

Here are the steps you can follow：

1. Create calculated column.

``datediff = DATEDIFF('Table'[Transaction Date],TODAY(),DAY)``

2. Create measure.

``````Flag =
var _max=CALCULATE(MAX('Table'[datediff]),FILTER(ALL('Table'),'Table'[Customer Name]=MAX('Table'[Customer Name])&&'Table'[Dr/Cr]=MAX('Table'[Dr/Cr])))
return
IF(
_max >=30 && MAX('Table'[USD]) >0,1,0)``````

3. Place [Flag]in Filters, set is=1, apply filter.

4. Result:

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

3 REPLIES 3
Community Support

Hi  @Wasfiathhar ,

I created some data:

Here are the steps you can follow：

1. Create calculated column.

``datediff = DATEDIFF('Table'[Transaction Date],TODAY(),DAY)``

2. Create measure.

``````Flag =
var _max=CALCULATE(MAX('Table'[datediff]),FILTER(ALL('Table'),'Table'[Customer Name]=MAX('Table'[Customer Name])&&'Table'[Dr/Cr]=MAX('Table'[Dr/Cr])))
return
IF(
_max >=30 && MAX('Table'[USD]) >0,1,0)``````

3. Place [Flag]in Filters, set is=1, apply filter.

4. Result:

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Frequent Visitor

If any customer having overdue invoices (30+) need to hold the customers all the line items including the current invoices.
How Dax can be perform

Helper II

I don't 100% understand what you're wanting. However, I beilieve this may be helpful for you: https://www.youtube.com/watch?v=jyxZxFT_pAY

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors