Grouping and Filtering (maybe not a proper topic name)

Hello and Happy Holidays!

I need to ask for your help again!
(please see attachment)

I have to find a proper way how to flag a Customer Account with 90+ day past due balance.
“The Flag” should be applied to each Customer invoice, even if it’s not due, but Custmer account does.
And one more exception :“The Flag” filter should be applied to each individual file in the column [Source.Name].

It should be something like that:
-Apply “The Flag” rule into each individual file in [Source.Name]

  • Mark with “The Flag” rule Customer’s transactions if one of them labeled “Over 90” in [Aging Bucket]
    -If Customer doesn’t have records labeled “Over 90” in [Aging Bucket] mark as “Other”.

Thank you very much!
Natasha
AR.pbix (224.1 KB)

Hi @npower,

See if this meets your requirement.

I’ve added a Calculated Column because you didn’t supply data files. However imo you should translate this logic to Power Query/M to achieve the same result.

Flag (CC) = 
VAR cCust = 'GP_ AR Aging'[Customer Number]
VAR cFile = 'GP_ AR Aging'[Source.Name]
VAR t =
    COUNTROWS(
        FILTER( 'GP_ AR Aging',
            'GP_ AR Aging'[Customer Number] = cCust &&
            'GP_ AR Aging'[Source.Name] = cFile &&
            'GP_ AR Aging'[Aging Bucket] = "Over 90"
        )
    )
RETURN

IF( t > 0,
    "Flag",
    "Other"
)

I hope this is helpful.

1 Like

Hello @npower, it’s been a while since we got a response from you.

Just following up if you still need help with your inquiry?

If you do, kindly provide the information the experts requested above so they can help you further.

In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.

Due to inactivity, we’ll be marking this post as solved.

Hi Melissa!

So sorry for late response, my computer didn’t make with me this week-end, was left behind:)

I really appreciate your help! I culdn’t do it in queries, but it worked perfectly with Calculated Column.

Your help is enormous thank you very much!