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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RickJani
Frequent Visitor

How to check if customer maintained balance throughout the month

Hello folks,

I want to check if customer maintained > 0 balance every day for 3 months so bank won't charge them any service fee. 

If any day within 3 months, customer balance was zero, then service fee is charged.

 

Can someone help me to find out how to accomplish this in power Bi?

 

Thanks

 

Rick

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @RickJani ,

I add some data:

vyangliumsft_0-1657002537481.png

Here are the steps you can follow:

1. Create measure.

Measure =
MAX('Table'[Balance]) - MAX('Table'[Amount])
Flag =
var _today=TODAY()
var _mindate=DATE(
    YEAR(_today),MONTH(_today)-3,DAY(_today))
return
IF(
    MAX('Table'[Date])>=_mindate&&MAX('Table'[Date])<=TODAY()&&[Measure]>0,"NO","service fee is charged")

2. Result:

vyangliumsft_1-1657002537482.png

If you need pbix, please click here.

 

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

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi  @RickJani ,

 

"balance is not zero but service fee is charged." Is there any calculation formula? You can express the result in the form of pictures, we can help you better.

 

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.

Thanks for your help Liu.

Anonymous
Not applicable

Hi  @RickJani ,

I add some data:

vyangliumsft_0-1657002537481.png

Here are the steps you can follow:

1. Create measure.

Measure =
MAX('Table'[Balance]) - MAX('Table'[Amount])
Flag =
var _today=TODAY()
var _mindate=DATE(
    YEAR(_today),MONTH(_today)-3,DAY(_today))
return
IF(
    MAX('Table'[Date])>=_mindate&&MAX('Table'[Date])<=TODAY()&&[Measure]>0,"NO","service fee is charged")

2. Result:

vyangliumsft_1-1657002537482.png

If you need pbix, please click here.

 

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

Many thanks Liu. I really appreciate your effort. It works well except in last 2 rows where balance is not zero but service fee is charged.

RickJani
Frequent Visitor

Many thanks Nathan! That was quick!

 

I have data like this...I need to group by date by customer and check balance if it is more than zero

DateCust IDtransactionAmountBalance
01-Jancust 1debit100600
01-Jancust 2credit200800
03-Jancust 3debit18002900
04-Jancust 1credit300900
06-Jancust 4credit600018500
06-Jancust 2debit9002000
08-Jancust 2debit700100
Nathaniel_C
Community Champion
Community Champion

Hi @RickJani ,

If you have a column with the daily balance, you might create a column that is Fee due= If(table[Balance]>0,0,1) then your measure might be Penalty = If(Sum(table[Fee due]>0,"Penalty is due", "No Penalty")
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Nathaniel_C
Community Champion
Community Champion

Hi @RickJani ,

Please give us more data or share your .pbix with us.

 


If you would share your pbix, or dummy up some values in Excel both for current and expected data. Please copy and paste them into your post, rather than doing a picture, we may be able to help you. 

Please read this post to get your question answered more quickly:

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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