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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
chankins
Regular Visitor

measure in table for individual row compared to total

I am looking to create a measure to go into a table for the example data and desired result below. The measure I need would be the % Lift column. It would be the % for the individual item compared to the Total for Category B

 

CategoryItem%Total B% Lift
A150%30%67%
A255%30%83%
A360%30%100%
A465%30%117%
A570%30%133%
subtotal A 60%  
B620%  
B725%  
B830%  
B935%  
B1040%  
subtotal B 30%  
6 REPLIES 6
v-yuta-msft
Community Support
Community Support

@chankins ,

 

I suppose the [%] is column, not measure, you can create a measure using DAX below:

% Lift = 
VAR Total_B = CALCULATE(AVERAGE('Table'[%]), FILTER(ALL('Table'), 'Table'[Category] = "B"))
VAR Current_Percentage = MAX('Table'[%])
VAR Current_Category = MAX('Table'[Category])
RETURN
IF(Current_Category = "A", (Current_Percentage / Total_B) - 1, BLANK())

 Capture.PNG 

 

Community Support Team _ Jimmy Tao

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

Unfortuately the % calculation is a measure that is based on variables so it cannot be made into a calculated column

@chankins ,

 

Could you share the dax formula of measure [%]?

 

Regards,

Jimmy Tao

% = DIVIDE([SALES],[GOALS])

v-yuta-msft
Community Support
Community Support

@chankins ,

 

"The measure I need would be the % Lift column. It would be the % for the individual item compared to the Total for Category B"

 

<--- Could you please use some simple formula or expression to clarify this logic?

 

Community Support Team _ Jimmy Tao

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

% lift = (% / Total B) - 1

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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