cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mdemos02 Frequent Visitor
Frequent Visitor

Firstnonblank measure help

Hello All,

 

I have a table with clients, date and deposit amount. What I want is to count how many clients made  first deposit and how much they deposited with the most efficient way. 

 

What I did:  

I created a new table with clients and the min date for each one. Then I run a lookup and I put "YES" if the FTD date match with the Deposit Date . Then I count and sum with filter "YES". 

 

FTD count = 5

FTD amount = 950

 

I suppose that there is a more efficient way to calculate the above with firstnonblank, without using additional table. Can anyone help me out? 

 

See below:

Table at the beginning.

ClientDeposit DateDeposit Amount
a01/01/2019100
b02/01/2019200
c03/01/201950
d04/01/2019400
e05/01/2019200
d06/01/201950
a07/01/201980
b08/01/2019800
c09/01/201990
d10/01/2019150
a11/01/2019250
a12/01/2019300
b13/01/2019180
c14/01/201990
d15/01/201970
a16/01/201950

 

Table Created:

ClientFTD Date
a01/01/2019
b02/01/2019
c03/01/2019
d04/01/2019
e05/01/2019

 

Final table:

Original Data TableCalculated Columns
ClientDeposit DateDeposit AmountFTD DateFTD (YES/NO)
a01/01/201910001/01/2019YES
b02/01/201920002/01/2019YES
c03/01/20195003/01/2019YES
d04/01/201940004/01/2019YES
e05/01/201920005/01/2019YES
d06/01/20195004/01/2019NO
a07/01/20198001/01/2019NO
b08/01/201980002/01/2019NO
c09/01/20199003/01/2019NO
d10/01/201915004/01/2019NO
a11/01/201925001/01/2019NO
a12/01/201930001/01/2019NO
b13/01/201918002/01/2019NO
c14/01/20199003/01/2019NO
d15/01/20197004/01/2019NO
a16/01/20195001/01/2019NO
1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Firstnonblank measure help

Hi @mdemos02 

You can add this two columns to yourTable.

 

FTD = CALCULATE(
    MIN(yourTable[Deposit Date]),
    ALLEXCEPT(yourTable, yourTable[Client])
)
FTD (YES/NO) = 
IF(yourTable[Deposit Date] = yourTable[FTD], "YES", "NO")

Regards,
Mariusz

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

2 REPLIES 2
Super User
Super User

Re: Firstnonblank measure help

Hi @mdemos02 

You can add this two columns to yourTable.

 

FTD = CALCULATE(
    MIN(yourTable[Deposit Date]),
    ALLEXCEPT(yourTable, yourTable[Client])
)
FTD (YES/NO) = 
IF(yourTable[Deposit Date] = yourTable[FTD], "YES", "NO")

Regards,
Mariusz

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

Super User
Super User

Re: Firstnonblank measure help

Hi @mdemos02 

Actualy FIRSTDATE would be better as it will find first nonblanc date.

FTD = CALCULATE(
    FIRSTDATE(yourTable[Deposit Date]),
    ALLEXCEPT(yourTable, yourTable[Client])
)

Regards,
Mariusz

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

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)