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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Jaweed
Helper III
Helper III

Assistance- To Compare a value against Total in a matrix

Hi all

I have a Table in Excel with these columns:

Company     Date              Criteria                   Count

CPYA            Jan 24            New Joiners           1

CPYA            Feb 24          New Joiners             10

CPYA            Mar 24          New Joiners           7

 

I have done a matrix, which is working fine, showing the company as row, and New Joiners as Column. Actually I have lots of companies and many criteria in the table.  For simplicity, I 

Question:  How to calculate the average and compare each row with the average, If Row value is  < Average( Count ),  then NewMeasure = 0 , else = 1. In this case Average Count= 18/3 = 6

 

Matix is like

 CPY A                              Count     Average    New Measure ( Looking for help)

     Jan 24                            1                                           0

     Feb 24                          10                                          1

    March 24                         7                                          1

Total                                   18             6                          1

 Thanks

 

 

1 ACCEPTED SOLUTION
Sahir_Maharaj
Super User
Super User

Hello @Jaweed,

 

Can you please try this approach:

 

1. Calculate the Average Count

Average Count = 
AVERAGEX(
    VALUES('Table'[Date]),
    CALCULATE(SUM('Table'[Count]))
)

2. Create the New Measure

NewMeasure = 
VAR CurrentCount = SUM('Table'[Count])
VAR AvgCount = [Average Count]
RETURN IF(CurrentCount < AvgCount, 0, 1)

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

View solution in original post

2 REPLIES 2
Sahir_Maharaj
Super User
Super User

Hello @Jaweed,

 

Can you please try this approach:

 

1. Calculate the Average Count

Average Count = 
AVERAGEX(
    VALUES('Table'[Date]),
    CALCULATE(SUM('Table'[Count]))
)

2. Create the New Measure

NewMeasure = 
VAR CurrentCount = SUM('Table'[Count])
VAR AvgCount = [Average Count]
RETURN IF(CurrentCount < AvgCount, 0, 1)

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

@Sahir_Maharaj , Thank you so much Sir. Working properly. Only thing is that I cannot interprete my Grand Total value.

 

Jaweed_0-1711984347797.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors