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

Need help summing values of one column from unique values in two other columns

I have some data that I am trying to sum up based on unique values from two other columns. There are three columns: Year, Class, and Usage. I am trying to have it filter through the Year and Class columns and for each unique combination of those columns, it will sum up the Usage column. I have about 100,000 rows of data so is there a function I can use where I don't have to explicitly write in the column combination and it will just sum up the distinct combinations by itself?

 

Thanks!

 

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @kblommer 

You can do it in Query Editor.

Select Class column, go to Transform Ribbon and click Pivot Column and for Values Column select Usage.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

View solution in original post

6 REPLIES 6
Geradav
Responsive Resident
Responsive Resident

Hi @kblommer 

 

Is the following what you are trying to achieve?

Annotation 2019-07-31 182554.jpg

 

Then a simple SUM ( Table[Usage] ) should do. Unless I misunderstood something?

 

Let us know if that's not what you are looking for

Mariusz
Community Champion
Community Champion

Hi @kblommer 

 

Can you provide a data sample?

 

Best Regards,
Mariusz

Please feel free to connect with me.
Mariusz Repczynski

 

 

Capture2.PNG

 

Thanks!

Mariusz
Community Champion
Community Champion

Hi @kblommer ,

Are you looking to output a table an extra column to this table or a measure?

 

Best Regards,
Mariusz

Please feel free to connect with me.
Mariusz Repczynski

 

I am trying to output a table for instance that looks like this:

 

Capture5.PNG

Thank you for your help!

Mariusz
Community Champion
Community Champion

Hi @kblommer 

You can do it in Query Editor.

Select Class column, go to Transform Ribbon and click Pivot Column and for Values Column select Usage.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

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.