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
jonbox
Helper II
Helper II

total part of a column with part of another column

Hi all, 

 

I'm trying to work out how to add a aspects of a column together based on another column.

 

I have several departments with different "scorecard" areas that I want to total up, e.g. for FFR i want to total JUST the ITOT scorecard area, JUST the Manufacturing Plant P2P / GRIR area etc... I want to do the same for other departments too.

 

So in the example below, I want to calculate all FFR ITOT scores (0.97 + 1 + 0.33) and show it in just one row. same for manufacturing plant p2p, (408 + 1) and show in just one row so it shows JUST the totals per scorecard area. 

jonbox_2-1634301649770.png

Issue is, i don't have a clue on how to do this logically so any help would be very appreciated. 

 

Thanks in advance. 

 

 

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@jonbox ,see if these can help

 

a new column like

Sumx(filter(Table, [departments] = earlier([departments]) && [Magics Scorecard Area] = earlier([Magics Scorecard Area])),[Jul])

 

or a new measure like

Sumx(filter(allselected(Table), [departments] = max([departments]) && [Magics Scorecard Area] = max([Magics Scorecard Area])),[Jul])

View solution in original post

v-yangliu-msft
Community Support
Community Support

Hi  @jonbox ,

According to your error message:

Your column [Jul] is of String type, you can change it to Decimal number type here:

vyangliumsft_0-1634522531754.png

 

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.

View solution in original post

4 REPLIES 4
jonbox
Helper II
Helper II

Thank you very much both for the help. 

v-yangliu-msft
Community Support
Community Support

Hi  @jonbox ,

According to your error message:

Your column [Jul] is of String type, you can change it to Decimal number type here:

vyangliumsft_0-1634522531754.png

 

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.

amitchandak
Super User
Super User

@jonbox ,see if these can help

 

a new column like

Sumx(filter(Table, [departments] = earlier([departments]) && [Magics Scorecard Area] = earlier([Magics Scorecard Area])),[Jul])

 

or a new measure like

Sumx(filter(allselected(Table), [departments] = max([departments]) && [Magics Scorecard Area] = max([Magics Scorecard Area])),[Jul])

Hey Amit, thanks for the reply.

 

Unfortunately I've not been able to get your solution to work. I receive issues on both solutions;

 

With creating the measure i get this issue

jonbox_1-1634304447751.png

 

jonbox_0-1634304418474.png

 

and with the new column i have #ERROR on every row.

 

jonbox_2-1634304475189.png

 

Any help with this please? 

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.