Skip to main content
cancel
Showing results for 
Search instead 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.

Reply
Alta88
Helper IV
Helper IV

Measure to Flag Fees on Accounts

Our accounts sometimes require a specific fee based on the city, state, and county in which they're located. I want to create a flag to show which accounts were not charged the applicable fee.

 

For example: an account in Las Vegas, NV, in the County of Clark, will have a fee of $7. Any accounts where this is fee isn't charged will need to be flagged.

 

Alta88_0-1670277731242.png

 

1 ACCEPTED SOLUTION
v-yinliw-msft
Community Support
Community Support

Hi @Alta88 ,

 

You can try this method:

New a measure:

Color =
SWITCH (
    TRUE (),
    MAX ( 'Table'[City] ) = "Las Vegas"
        && MAX ( 'Table'[State] ) = "NV"
        && MAX ( 'Table'[County] ) = "Clark"
        && MIN ( 'Table'[Fee] ) <> 7, "Red"
)

And set a conditional format to the Fee column:

vyinliwmsft_0-1670303701402.png

vyinliwmsft_1-1670303717869.png

Then the result is:

vyinliwmsft_2-1670303739670.png

Hope this helps you.

Here is my PBIX file.

 

Best Regards,

Community Support Team _Yinliw

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

 

View solution in original post

3 REPLIES 3
Alta88
Helper IV
Helper IV

Follow up: could I use this same measure's syntax to flag for the following? Our accounts that list a bank account (Checking, Savings, etc.) need to then have an ACH indicator checked for proper billing. 

 

I need to flag which accounts have an actual bank account (Bank Acct Type) and whether or not the ACH indicator is checked.  If it's not checked and there is a bank account, we would flag for an error: 

 

Alta88_0-1670448570545.png

 

Alta88
Helper IV
Helper IV

Yes, thanks for this! Greatly appreciated!

v-yinliw-msft
Community Support
Community Support

Hi @Alta88 ,

 

You can try this method:

New a measure:

Color =
SWITCH (
    TRUE (),
    MAX ( 'Table'[City] ) = "Las Vegas"
        && MAX ( 'Table'[State] ) = "NV"
        && MAX ( 'Table'[County] ) = "Clark"
        && MIN ( 'Table'[Fee] ) <> 7, "Red"
)

And set a conditional format to the Fee column:

vyinliwmsft_0-1670303701402.png

vyinliwmsft_1-1670303717869.png

Then the result is:

vyinliwmsft_2-1670303739670.png

Hope this helps you.

Here is my PBIX file.

 

Best Regards,

Community Support Team _Yinliw

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

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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