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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Ttable data consolidate

Hi All,

Have table as mentioned below with Multiple names and Grades.

NameGradeCost
AppleA120
AppleB90
AppleA120
AppleB90
AppleC80
AppleD75
AppleC80

Required to consolidate the above table as per the below table.

NameGradeCost
AppleA240
AppleB180
AppleC180
AppleD75

 

Any one can help me!!!

Thanks in advance.

 

Regards,

Murali

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

Solution1:

 

You can just put the column Name, Grade, Cost into Table visual, then set the aggregation of cost as "Sum".37.png

 

 

 

 

 

 

 

 

 

 

 

 

Solution2:

 

You can create measure like DAX below.

 

Measure1= CALCULATE(SUM(Table1[Cost]),FILTER(ALLSELECTED(Table1),Table1[Name] =MAX(Table1[Name])&&Table1[Grade] =MAX(Table1[Grade])))

 

Best Regards,

Amy

 

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

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi  @Anonymous ,

 

Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

Solution1:

 

You can just put the column Name, Grade, Cost into Table visual, then set the aggregation of cost as "Sum".37.png

 

 

 

 

 

 

 

 

 

 

 

 

Solution2:

 

You can create measure like DAX below.

 

Measure1= CALCULATE(SUM(Table1[Cost]),FILTER(ALLSELECTED(Table1),Table1[Name] =MAX(Table1[Name])&&Table1[Grade] =MAX(Table1[Grade])))

 

Best Regards,

Amy

 

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

 

 

Nathaniel_C
Super User
Super User

Hi @Anonymous ,

 

Try =sumx(values('Table1 2'[Grade]),'Table1 2'[Sum of Cost]).

 

or in PBI

Consolidate = sumx(values('Table1_2'[Grade]),SUM(Table1_2[Cost]))
Consolidate.PNG

 

 

 

If this helps, consider marking this as the solution! Kudos are nice too.

 

Nathaniel





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

Proud to be a Super User!




Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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