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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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

Top Kudoed Authors