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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
BryanDAX345
Frequent Visitor

Add DAX measure result to specific category

Need help with adding the result of a DAX measure into a Specific Category.

For Example:

DAX result = 50

I need to add the DAX result to category E

 

CategoryOriginal ValuesDesired Result
A7676
B1313
C8787
D5252
E54104
Total282332

 

The DAX result is not related to the category, therefore when I add the DAX measure to the Original values, it adds 50 to all the categories but I need this to be added to Category E.
I tried using an if statement but I get an incorrect Total value 
@daxdaxdax @PowerBI @daxdax @dax 

1 ACCEPTED SOLUTION

This was useful but Im not able to use a calculated column since my dataset is more complex than just those 5 categories.
I was able to make it work by introducing a SUMX to your formula. Thanks!

 

New Value = SUMX('Table', IF('Table'[Category] = "E", 'Table'[Original Value] + [Measure], 'Table'[Original Value] ))

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Write this measure

DR = if(min(Data[Category])="E",[original values]+[DAX result],[original values])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks but this does not return the correct value for the total.

It returns the same total as the sum of Original Value.

Irwan
Super User
Super User

hello @BryanDAX345 

 

please check if this accomodate your need.

Desired Result =
IF(
    'Table'[Category]="E",
    'Table'[Original Values]+'Table'[DAX result],
    'Table'[Original Values]
)

Irwan_0-1721335079331.png

Plot your value in table visual (DAX result is in measure form).

Irwan_1-1721335120221.png

 

Hope this will help you.

Thank you.

This was useful but Im not able to use a calculated column since my dataset is more complex than just those 5 categories.
I was able to make it work by introducing a SUMX to your formula. Thanks!

 

New Value = SUMX('Table', IF('Table'[Category] = "E", 'Table'[Original Value] + [Measure], 'Table'[Original Value] ))

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