Forum Discussion

Wasfiathhar's avatar
Wasfiathhar
Frequent Visitor
4 years ago
Solved

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 ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    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:

    Please click here for the pbix file

     

    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