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
Chris2016
Resolver I
Resolver I

Column that replaces a measure

Hello,

I have a table that looks at exams statuses by users:

UserTestPassed
AZ1
AX 
AY1
AW1
BY1
BW 
BZ1
CZ1
CW 
CX1
DW 
DZ1
EY1
EW1
FX1
FZ 

 

I have a measure that calculates % Passed for each user:

% Passed = DIVIDE(SUM([Passed]), COUNT('Table'[Test]), 0)

I need to tag each user as having "bad results" (with a % Passed < 60%) or "good results" (with a % Passed >= 60%).

I already have a working solution where I am creating a new table with SUMMARIZE to get the aggregate results for users:

Table:

Results =
SUMMARIZE (
    FILTER ( 'Table','Table'[User] <> BLANK () ),
  'Table'[User],
    "Result", [% Passed])

Column:

Results = IF([Result]>=0.6, "Good", "Bad")
But I would like to be able to create a column directly in my table and not use a calculated table.

Chris2016_0-1694023680115.png

 

Any ideas how I can do that?

Thanks a lot!


 



 

1 ACCEPTED SOLUTION
some_bih
Super User
Super User

Hi @Chris2016 possible solution "in table": please create 4 calculated column (or less if you want to combine some steps), ajdust Sheet1 to your Table name.

Did I answer correctly? Kudos appreciate / accept solution.

Sum per User =
CALCULATE(
    SUM(Sheet1[Passed]),
    ALLEXCEPT(Sheet1,Sheet1[User])
)
 
Count per User =
CALCULATE(
    COUNT(Sheet1[User]),
    ALLEXCEPT(Sheet1,Sheet1[User])
)
 
% Result = DIVIDE(Sheet1[Sum per User],Sheet1[Count per User])
 
Results = IF([% Result]<0.6,"Bad", "Good")
Output
 
some_bih_0-1694031886485.png

 

Overview

some_bih_1-1694031897649.png

 





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

Proud to be a Super User!






View solution in original post

2 REPLIES 2
Chris2016
Resolver I
Resolver I

Thanks,
I put the it all in a single column:

Result =
var SumPerUser =
CALCULATE(
    SUM(MyTable[Passed]),
    ALLEXCEPT(MyTable,MyTable[User])
        )
var CountPerUser =
CALCULATE(
    COUNT(MyTable[User]),
    ALLEXCEPT(MyTable,MyTable[User])
        )
var perc=  DIVIDE(SumPerUser,CountPerUser,0)
return if (perc < 0.6, "Bad", "Good")

 

Chris2016_0-1694073400684.png

 


Many thanks for your help!

some_bih
Super User
Super User

Hi @Chris2016 possible solution "in table": please create 4 calculated column (or less if you want to combine some steps), ajdust Sheet1 to your Table name.

Did I answer correctly? Kudos appreciate / accept solution.

Sum per User =
CALCULATE(
    SUM(Sheet1[Passed]),
    ALLEXCEPT(Sheet1,Sheet1[User])
)
 
Count per User =
CALCULATE(
    COUNT(Sheet1[User]),
    ALLEXCEPT(Sheet1,Sheet1[User])
)
 
% Result = DIVIDE(Sheet1[Sum per User],Sheet1[Count per User])
 
Results = IF([% Result]<0.6,"Bad", "Good")
Output
 
some_bih_0-1694031886485.png

 

Overview

some_bih_1-1694031897649.png

 





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

Proud to be a Super User!






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.