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
ShaGuna32
Helper I
Helper I

Power BI DAX query to build a logic for Creating an Overall Average for Suppliers

Hi Team,

It will be much appreciated if anyone can help me in deriving a logic to calculate the overall Average against each customer by excluding the current line supplier.

 

Example: 

The Dax should automatically eliminate the current line's Supplier and should calculate the average for the rest of the Suppliers.

SupplierSalesComparative Average
A3Average(b&C)
B5Average(A&C)
C4

Average(B&C)

 

Any suggestion will help in my analysis to calculate the benchmarking against each other. 
Thanks so much for your time,

 

Kind Regards
Sha

1 ACCEPTED SOLUTION
bolfri
Solution Sage
Solution Sage

Hi,

 

I think you need that one:

Comparative Average = 
CALCULATE(
    AVERAGE('Sample'[Sales]);
    FILTER(
        ALLSELECTED('Sample');
        NOT('Sample'[Supplier] in VALUES('Sample'[Supplier])))
    )

Basic measures:

Sum of sales = SUM('Sample'[Sales])
Average sales = AVERAGE('Sample'[Sales])

Results:
Note that I've extended the data that you've provided to more rows.
bolfri_0-1671673504191.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
bolfri
Solution Sage
Solution Sage

Hi,

 

I think you need that one:

Comparative Average = 
CALCULATE(
    AVERAGE('Sample'[Sales]);
    FILTER(
        ALLSELECTED('Sample');
        NOT('Sample'[Supplier] in VALUES('Sample'[Supplier])))
    )

Basic measures:

Sum of sales = SUM('Sample'[Sales])
Average sales = AVERAGE('Sample'[Sales])

Results:
Note that I've extended the data that you've provided to more rows.
bolfri_0-1671673504191.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi Bolfri,

Thanks for the Idea, It worked Exactly the way I wanted. Much appreciated.

kind Regards
Sha

ribisht17
Community Champion
Community Champion

@ShaGuna32 

 

Step 1 

Total Sales = CALCULATE(sum('Sales Table'[Sales]),all('Sales Table'))
 
Step 2
Count of Suppliers = CALCULATE( COUNT('Sales Table'[Suppplier]),all('Sales Table'))-1
 
Step 3
Final Avg = DIVIDE('Sales Table'[Total Sales]-sum('Sales Table'[Sales]),[Count of Suppliers])
ribisht17_0-1671669449396.png

 

 
Regards,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !! PL 300 Certification Series

Thanks, Ritesh, for your suggestion.
Much appreciated.

Kind Regards

Sha

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.