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

Calculate and Sum with Wildcard

Hi there

is there a possibility to set a sum from a filter with wildcard using DAX?

I have a list of accounts.
I want to sum the accounts >=10xx* and <=109x*.
The accounts are formatted as numeric fields.
Without a wildcard the filter works, but the accounts are dynamic, so I am looking for a solution to make it so.

 

CALCULATE(
    SUM('TBL'[Sales]),
    FILTER(ALL(TBL[Accounts]),TBL[Accounts] >=10* && <=109*)
)
 
Thanks for a Tipp
Regards,
1 ACCEPTED SOLUTION

@Greg_Deckler correct, i find a way for this

 

CALCULATE(
SUM('TBL'[Bewegung]),
FILTER(ALL(TBL[Konto]),TBL[Konto] >=1000 && TBL[Konto] <=1099 && TBL[Konto] >=10000 && TBL[Konto] <=10999)
)

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

@thebeginner1204 
Please provide sample data along with the expected result.

@tamerj1 sure, here:

 

Printscreen.png

 

The following list contains accounts (Columm "Konto") which have to be calculated separately.
Marked red refers to the question in this case.
The filter should sum up all values in the column "Bewegung" which are either >=1000 <=1099 or >=10000 <= 10999 in the column "Konto", i.e. either between 1000 and 1099 or between 10000 and 10999.

This is how I tried it, the formula works, but the result is 0.

 

This is how I tried it, the formula works, but the result is 0.

 

CALCULATE(
SUM('TBL'[Bewegung]),
FILTER(ALL(TBL[Konto]),TBL[Konto] >=1000 && TBL[Konto] <=1099 && TBL[Konto] >=10000 && TBL[Konto] <=10999)
)

Greg_Deckler
Community Champion
Community Champion

@thebeginner1204 Well, you don't need the * for the >10. Perhaps pick a reasonable maximum for the other? 109999?



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...

@Greg_Deckler correct, i find a way for this

 

CALCULATE(
SUM('TBL'[Bewegung]),
FILTER(ALL(TBL[Konto]),TBL[Konto] >=1000 && TBL[Konto] <=1099 && TBL[Konto] >=10000 && TBL[Konto] <=10999)
)

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.