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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
LouieCorrea
New Member

SUMIFS LESS THAN OR GREATER TO A REFERENCE COLUMN IN DAX

Kindly asking for help.

 

I want to add (or count) certain columns with reference to a column containing whole numbers (1, 2, 3, 4...). The outcome will be based on a filter (single select from [1, 2, 3, 4...]).

 

The logic is:

  • if I select 1 - will sum our count all tagged as 1
  • if I select 2-  will sum our count all tagged as 1 & 2 (basically <= 2)
  • if I select 3 - will sum our count all tagged as 1, 2, and 3 (basically <= 3)

Normally in Excel the formula will be: '=SUMIFS(<Value_to_Add_Column>,<Reference_Column>,"<=" & <Reference_Number>)

 

For the below screenshot: =SUMIFS($B:$B,$C:$C,"<="&$E2)

 

Thank you!

 

LouieCorrea_1-1682585557275.png

 

LouieCorrea_2-1682585585072.png

 

 

 

 

 

1 REPLY 1
johnt75
Super User
Super User

Try

Total Amount =
CALCULATE (
    SUM ( 'Table'[Amount] ),
    'Table'[Group number] <= SELECTEDVALUE ( 'Group table'[Group number] )
)

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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