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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
atavo
Helper I
Helper I

Minimum value for sum - bank scenariio

Hi appreciate the assistance with reference to the Data Table below:

 

Is there a measure that captures a customer's minimum account balance:

1. at the lowest granularity (i.e. AccountNo level) but

2. at the customer level, it captures the minimum value of the sum of account balances for respective customers

 

Have included what the desired result should be.

 

At the moment, I am using powerpivot to extract the minimum balance at the deposit account level.

 

I then sum the minimum balance of a customers various deposit accounts to arrive at a minimum balance at the customer level using sumif. With data going to the millions of rows, this is just not a practical solution.

 

 

 

Table2.png

 

Thanks

Alfred

4 REPLIES 4
Eric_Zhang
Employee
Employee


@atavo wrote:

Hi appreciate the assistance with reference to the Data Table below:

 

Is there a measure that captures a customer's minimum account balance:

1. at the lowest granularity (i.e. AccountNo level) but

2. at the customer level, it captures the minimum value of the sum of account balances for respective customers

 

Have included what the desired result should be.

 

At the moment, I am using powerpivot to extract the minimum balance at the deposit account level.

 

I then sum the minimum balance of a customers various deposit accounts to arrive at a minimum balance at the customer level using sumif. With data going to the millions of rows, this is just not a practical solution.

 

 

 

Table2.png

 

Thanks

Alfred


@atavo

Is 300 for the customer Jack in Aug-17 a typo? My understanding is that the value shall be 250(50+200)? If my understanding is correct, you can create a measure as below. See more details in the attached pbix file.

Measure =
VAR summizedTbl =
    SUMMARIZE (
        'yourTable',
        yourTable[Customer],
        yourTable[AccountNo],
        yourTable[YearMon],
        "minBal"MIN ( yourTable[Balance] )
    )
RETURN
    SWITCH (
        TRUE (),
        ISFILTERED ( 'yourTable'[Customer] ) && ISFILTERED ( yourTable[AccountNo] )MIN ( yourTable[Balance] ),
        ISFILTERED ( 'yourTable'[Customer] ) && ISFILTERED ( yourTable[YearMon] )SUMX ( summizedTbl, [minBal] ),
        ISFILTERED ( 'yourTable'[Customer] )
            && NOT ( ISFILTERED ( yourTable[YearMon] ) )CALCULATE (
            MIN ( 'Table'[sumMinBal] ),
            ALLEXCEPT ( yourTable, yourTable[Customer] )
        ),
        MIN ( yourTable[Balance] )
    )

Capture.PNG

Hi Eric
It's not a typo. At the customer level, the total balance for Jack on 25/8 and 26/8 are 300 and 350 respectively. Hence, minimum value is 300
vanessafvg
Super User
Super User

@atavo sorry just to clarify do you mean minimum balance at the earliest date?

 

if that is what you mean using something like first date might work ie

 
measure =
CALCULATE ( SUM ( data[balance] )FIRSTDATE ( data[date] ) )




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Thanks Vanessa
I am after a measure that:
1. Determines the minimum balance for each respective month and
2. If I slice the measure in 1. by AccountNo, it'll give me the minimum balance of each respective AccountNo for each respective month
3. Alternatively, if I slice the measure in 1. by Customer, it'll give me the minimum value of the sum of account balances for all accounts of each respective customer for each respective month

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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