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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
phangri
Regular Visitor

DAX measure that calculates the list of transactions whose SUM is greater than and less than $X

Hi everyone, 

 

Let's say that I have the following Fact Table and also a Calendar Table. 

 

Date

Account

DescriptionAmount
5/5/2023123Legal100k
5/6/2023123Legal200k
5/6/2023124Fees25k
5/7/2023124Legal100k
5/8/2023123Fees50k
5/9/2023124Incoming Transfer(270k)

 

The goal is to return the list of transactions whose SUM is greater than 250k or less than -250k.

 

Let's say that I selected a range of dates from 5/5/2023 to 5/7/2023 in my slicer. I expect the following result:

 

Date

Account

DescriptionAmount
5/5/2023123Legal100k
5/6/2023123Legal200k

 

I have this Dax formula but it excludes transactions less than 250k and I need the group of transactions that contribute to the condition.

 

FilteredTransactions =
VAR TotalTransactions = SUM('Cash Activity'[Transaction])
RETURN
    IF(
        OR(
TotalTransactions > 250000,
TotalTransactions < -250000
    ),
        'Cash Activity'[Transactions],
    BLANK()
)

 

Any idea how to achieve this?

 

Thank you in advance,

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@phangri Can you explain the logic in how you are arriving at your expected output because I'm not following.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler

 

I arrive at this result given that in the date range 5/5/2023 to 5/7/2023 the only account that in the sum of transactions is > 250k is the account "123", therefore it shows the transactions that contribute to that sum.

 

Let's say I'm selecting the range 5/7/2023 to 5/9/2023, the expected value would be BLANK given that:

 

5/7/2023 - Acct 124 - Legal - $100k
5/8/2023 - Acct 123 - Fees - $50k
5/9/2023 - Acct 124 - Incoming Transfer - $(270k)

 

Acct 124 = (170k)
Acct 123 = 50k

 

The sum of the transactions in that period of time does not meet the condition, so the list of transactions that occurred in that period would not be displayed.

 

Thank you!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.