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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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