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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.