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
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
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.