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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Avivek
Post Partisan
Post Partisan

Measures do work if filters are removed

I had created a measure for weighted avg which works fine when i check it with refernce to an account or the payment recieved date.

Avivek_1-1597155934390.png

But the same thing when i try to see in a matrix without applying filter the value changes and I am not able to understand why is it so.

Avivek_2-1597156116503.png

The above picture I have removed the date filter and for -6/2020 I have highlighted which shows a value of 498 which does not match with the above picture.

Below are the measures I have used for weighted average:

Weighted Avd days = CALCULATE(SUM(RECEIVABLES[Days Diff])*[Weights])
Weights = DIVIDE(SUM(RECEIVABLES[Weight]),[total weight])
 
6 REPLIES 6
amitchandak
Super User
Super User

@Avivek , Multiplication should always have row context

CALCULATE(SUM(RECEIVABLES[Days Diff])*[Weights],values(Table[Parent Account]))

or

sumx(values(Table[Parent Account]),SUM(RECEIVABLES[Days Diff])*[Weights])

 

use this

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak , can I add anothher glitch which I face,the value which we can see in the matrix for that particular account forjune month is 498.09

Avivek_0-1597166089191.png

But same thing if i try to add other columns and check it shows a total of 3324

Avivek_1-1597166177926.png

And when exported in excel it shows a total of 178

Avivek_2-1597166231986.png

Would you know why is that. appreciate your response in advance

 

Hi  @Avivek ,

 

Could you pls upload your .pbix file to onedrive business and share the link with us?Remember to remove the confidential information.

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Sorry, since its a live dataset I can't share the model file and using the the excel to create a similar report does not show any errors, but let me share a scenario if it helps.

Avivek_1-1597206381203.png

here you can see that the values do not match up with the overall total.

Weighted Avg days = CALCULATE(SUM(RECEIVABLES[Days Diff])*[Weights])
Weights = DIVIDE(SUM(RECEIVABLES[Weight]),[total weight])
Weight = RECEIVABLES[Days Diff]*RECEIVABLES[PAYMENT_AMOUNT]------this is a calculated column
Days Diff = (RECEIVABLES[Payment Recieved date])-(RECEIVABLES[Invoice Date])
 
I hope this helps, let me know if any other information needed.
 

 

 

Hi  @Avivek ,

 

Try to use the measure below:

measure=sumx(values(RECEIVABLES[Invoice Date]),[Weighted Avg days])

 


 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Thank you @amitchandak , this was a great piece of information, did not know this. Appreciate your help.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.