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
Anonymous
Not applicable

How can I get a summary results based on the mesures

Hi,

I am struggling with the summary results and would like to get some assistance. Thank you in advance for the supports!

 

I have a table like the 1st screen shot and would like to get a summary like the 2nd screen shot in orange.

By the way, HIGHEST EDU is a measure that I created in order to find the highest eduction of each employee.

HIGHEST EDU = CALCULATE(MAX(table[Education Rank]), ALLEXCEPT(table, table[ID]))

p1.jpg

p2.jpg

 

Thanks!

17 REPLIES 17
Anonymous
Not applicable

Hi Lionel,

 

Thank you for your assistance and I was able to repliate what you had done.

I am wondering if there is another way not to use allexcept function?  Since I have slicers on columns besides department?

 

Lindsey

Anonymous
Not applicable

Hi Liu Yang,

 

Thanks for the solution. As what I had posted, the one that you shared was solved.

What I am stuggling right now is that the group sum and the percentage. Would you please assist?  Thank you very much for the assistance.

Anonymous
Not applicable

Hi  @Anonymous  ,

According to this result:

v-yangliu-msft_0-1609139973903.png

You can create measure:

HASONEVALUE =
var _new=SUMMARIZE('Table','Table'[DEPT],"_value",[Sum])
return IF(HASONEVALUE('Table'[DEPT]),[Sum],SUMX(_new,[_value]))

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @parry2k ,

 

Thanks for sharing the 2 measures and they worked fine w/ the sample data (the 2nd table in the bottom).

 

As applying to the actual data sets, the sum results do not work (the 1st table on the top). I don't know if this is because I have a filter to the department. Do you have any idea?  I really appreciate your assistance, you and @PhilipTreacy had taught me a lot.  Really appreciate!!!!!

 

Annotation 2020-12-26 232027.jpg

Anonymous
Not applicable

Hi parry2k,

 

Thanks for the reminding. I will do it next time.

It seems like the sum values do not look correct. The sum for DEPT AG should be 7?

Thanks!

 

Annotation 2020-12-26 211819.jpg

 

parry2k
Super User
Super User

@Anonymous you should add this as a separate question so that not to bundle everything in one place.

 

Here are the measures

Sum = SUMX ( ALLEXCEPT ( Edu, Edu[Dept] ), [C] ) * DIVIDE ( [C], [C] )

% = DIVIDE ( [C], [Sum] )

Here are the measures though:

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi,

 

Thanks everyone assistance. I was able to get what I need.

If I need to create measures of SUM (column J) and Perentage (column K), what should I do?  Really appreciate everyone help!

 

Annotation 2020-12-26 193445.jpg

parry2k
Super User
Super User

@Anonymous good to hear it is working for you cheers!!

 

Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favorite Power BI feature releases in 2020

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Thanks! This is what I want.

parry2k
Super User
Super User

@PhilipTreacy you don't need to use Highest Edu in your visual, use Edu column

 

image.png



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi PhilipTreacy,

 

This is what I had tried so far. The results do not look correct. Would you please review again?

Thank you so much for the supports!

 

Annotation 2020-12-26 142832.jpg

Anonymous
Not applicable

Hi PhilipTreacy,

 

Thanks for your suggestions. I have tried it and got the following results.  They do not look correct.

Would you please review again? Thank you for the supports!

 

DEPT    Highest Edu       C

AG              4                            3

AP              4                             4

Anonymous
Not applicable

Here is the raw data

 

DEPTIDEDUHIGHEST EDU
AP1 04
AP10104
AP10304
AP10404
AG20404
AP30304
AP30404
AP40304
AP40404
AG50303
AG60303
AP70304
AP70404

 

parry2k
Super User
Super User

@PhilipTreacy try this measure

 

C = 
COUNTX ( 
    SUMMARIZE ( 
        Edu, 
        Edu[Dept], 
        Edu[EDU],
        Edu[ID], 
        "_c", CALCULATE ( MAX ( Edu[EDU] ), ALLEXCEPT ( Edu,Edu[ID] ) ) 
    ), 
    IF ( [_c] = Edu[EDU], 1 )
) 

 

CHECK MY LATEST BLOG POST Year-2020, Pandemic, Power BI and Beyond

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

DEPT ID EDU HIGHEST EDU AP 1 04 AP 1 01 04 AP 1 03 04 AP 1 04 04 AG 2 04 04 AP 3 03 04 AP 3 04 04 AP 4 03 04 AP 4 04 04 AG 5 03 03 AG 6 03 03 AP 7 03 04 AP 7 04 04

Anonymous
Not applicable

Let me repost my input and results.

 

My input source is like the table in blue (called table)  and it records everyone's education level.  --> e.g. ID = 1, she has entered  4 eduction records: null, 01, 03 & 04 and her highest education level is 04.   I would like to get a result like the table in orange.

 

By the way, HIGHEST EDU is a measure that I created in order to find the highest eduction of each employee.

HIGHEST EDU = CALCULATE(MAX(table[Education Rank]), ALLEXCEPT(table, table[ID]))

 

p1.jpg

Thanks!

PhilipTreacy
Super User
Super User

Hi @Anonymous 

I'm not following the logic that produces your summary table.  Why include highest Edu 03 and 04 but not 01?   Are you looking for a count of the number of people with each level of education, in each dept?  If so, why is the count for AP,03 blank?

regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


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.