cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
majdkaid22 Member
Member

Filter argument add to existing DAX formula

Hi guys,

 

I have created the following formula to capture the unique new funded clients

 

Power BI.PNG

 

New/Additional = if(ISEMPTY(CALCULATETABLE
('meAccountTransaction',ALLEXCEPT
('meAccountTransaction','meAccountTransaction'[ClientID]),'meAccountTransaction'[TransactionDate] < EARLIER
('meAccountTransaction'[TransactionDate]))), "New", "additional")

 

The above gives me the value whether "New or Additional",  based on date (EARLIER) regardless of the amount of the deposit & nor if there is any earlier deposit in the current month.  

 

 

What I would like to have is: 

_______ 

1- IF meAccountTransaction'[ClientID] does not exist prior to this month 

&

2- IF meAccountTransaction'[Sum Deposits] per  meAccountTransaction'[ClientID] during the current month is greater than 200

 

Then

"New", "additional"

_______

 

appreciate any help

 

Thanks,

M

 

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-sihou-msft
Moderator

Re: Filter argument add to existing DAX formula

@majdkaid22

 

In this scenario, you can just use MONTH() to compare the month part of [TransactionDate], and use AND() to combine the condition in IF(). The expression can be like:

 

New/Additional = if(
AND(
ISEMPTY(
CALCULATETABLE
('meAccountTransaction',
ALLEXCEPT('meAccountTransaction','meAccountTransaction'[Cli​entID]),
MONTH('meAccountTransaction'[TransactionDate]) < MONTH(EARLIER
('meAccountTransaction'[TransactionDate]))
)),
'meAccountTransaction'[Sum Deposits]>200), "New", "additional")

See my test sample below:

 

 

Capture233.PNG

 

Regards,

View solution in original post

2 REPLIES 2
Moderator v-sihou-msft
Moderator

Re: Filter argument add to existing DAX formula

@majdkaid22

 

In this scenario, you can just use MONTH() to compare the month part of [TransactionDate], and use AND() to combine the condition in IF(). The expression can be like:

 

New/Additional = if(
AND(
ISEMPTY(
CALCULATETABLE
('meAccountTransaction',
ALLEXCEPT('meAccountTransaction','meAccountTransaction'[Cli​entID]),
MONTH('meAccountTransaction'[TransactionDate]) < MONTH(EARLIER
('meAccountTransaction'[TransactionDate]))
)),
'meAccountTransaction'[Sum Deposits]>200), "New", "additional")

See my test sample below:

 

 

Capture233.PNG

 

Regards,

View solution in original post

majdkaid22 Member
Member

Re: Filter argument add to existing DAX formula

@v-sihou-msft apologies for my late reply. it has indeed worked out! 

 

Thanks mate

Helpful resources

Announcements
New Ranks and Rank Icons in 2020

New Ranks and Rank Icons in 2020

Read the announcement for more information!

New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

November 2019 Community Highlights

November 2019 Community Highlights

Get an overview of the events and great community content from November.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)