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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
sandee
Helper I
Helper I

Calculate with Sum Function

Hi All,

 

I am trying to apply the formula to get "total Amt Due" for customer based on the "No of Days above then 0", but i am doing drag and drop it is not working, please can you guide where i am doing mistake. many thanks for your help.

 

Not Completed.PNG

12 REPLIES 12
sandee
Helper I
Helper I

answer is :

SUMX(FILTER('Raw Data','Raw Data'[Days overdue] >=0),'Raw Data'[Amt Due ])
Anonymous
Not applicable

@sandee 

 

Total Amount=CALCULATE (SUMX(FILTER('Table',[Days overdue]>0),[Amt Due]),ALLEXCEPT('Working Ledger'[Cust Name])

 

 

Greg_Deckler
Super User
Super User

@sandee - Very difficult to understand. You could try:

Debt Overdue Days >0 =
  CALCULATE([TotalSum],FILTER(ALL('Working ledger'),[Days overdue]>0)

Otherwise, Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2. 



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Greg, you are right i should have provided more information for this , sorry for this.

 

below is an example table : i am applying to get "Total Amount" which is above then "0" Dys from "Debt Overdue Days" on client basis.

 

Table.PNG

 

i hope i am clear this time. thanks in advance

@sandee Still not quite clear. So, if that is the source data, what is the expected output?



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

I am looking for client name where the "Total amount" is greater than "0" No of days,

 

please ignore "cust No"

@sandee So:

Total Amount = SUMX(FILTER('Table',[Days overdue]>0),[Amt Due])



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

It is not working .

@sandee ,

in case days overdue is a measure
calculate(sumx(filter(Values('Working ledger'[customer]),[Days overdue]>0),[TotalSum]), all('Working ledger'))

calculate(sumx(filter(All('Working ledger'[customer]),'Working ledger'[Days overdue]>0),[TotalSum]))

calculate(sumx(filter(All('Working ledger'),'Working ledger'[Days overdue]>0),[TotalSum]))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amit,

 

not working any of them .

@sandee - OK, let's back-up. Sample data as text that I can copy. Expected output from said sample data. We are just going to spin our wheels otherwise. If you provide this, I will mock this up in a PBIX file that I keep and get to a working solution.

 

 



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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