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
HariniSheshadri
Frequent Visitor

Need help to convert an excel formula to DAX

Hi,

I am trying to convert the below formula to a DAX calculated column using the mentioned data set. I want to calculate the mean scores for each subsection per user and apply the formula. 

DataSet:

HariniSheshadri_0-1681909952860.png

Formula to be used: 100-((Mean score of subsection for each user *100)/4)

 

Any help would be appreciated in leading me in the right direction, thanks in advance. 

4 REPLIES 4
Anonymous
Not applicable

Hi @HariniSheshadri ,

You can create a calculated column as below to get it, please find the details in the attachment.

Column =
VAR _mean =
    CALCULATE (
        AVERAGE ( 'Table'[SubsectionScore] ),
        FILTER ( 'Table', 'Table'[User] = EARLIER ( 'Table'[User] ) )
    )
RETURN
    100 - ( ( _mean * 100 ) / 4 )

vyiruanmsft_0-1682490328960.png

Best Regards

HariniSheshadri
Frequent Visitor

Thanks for the response. But this formula dint work. It displays the same value for all the subsections in the list. 

Hi @HariniSheshadri 
Sorry to hear that.
When you said in your original post that you wanted a "DAX calculated colum" did you mean the formula to add a column in "Data View", or did you mean a measure that you could add to a table in "Report View"?

I only ask because I recreated your data as part of making my initial reply and it seemed to work there. Alternatively, perhaps you could share the/a .pbix file so we can see if there's something we hadn't thought about.

Matt

Coriel-11
Resolver II
Resolver II

Hi @HariniSheshadri 

Try this

Formula =
100 - (25*CALCULATE(
    AVERAGE('Delete data'[SubsectionScore]),
    ALLEXCEPT('Delete data', 'Delete data'[User], 'Delete data'[Subsection]))  )
 
Matt

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