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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Create column that sums from another table

I'm a beginner with Power BI and probably havent used whatever function I need that can accomoplish what I need... appreciate any help / support I can get! Thanks in advance!

 

I have a table with data like such:

LetterCount
A3
A2
A4
B4

 

And I have a master mapping file with just letters. I'd like to create a column in this other table that sums the count of the above. I know I can create a measure to sum the counts, but I specifically need it to be in column format so I can create text based columns off of it. I'd like the end result to look something the below. Need the range to also be a column and not measure so it can become a filter.

 

LetterCount (new column to sum off another table)Range (new column formula)
A95-10
B41-5

 

Thank you!! 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula in the Letters table

Count of letters = calculate(sum(Data[count]),filter(Data,Data[Letter]=earlier(Data[Letter])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula in the Letters table

Count of letters = calculate(sum(Data[count]),filter(Data,Data[Letter]=earlier(Data[Letter])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ryan_mayu
Super User
Super User

@Anonymous 

pls try this

Column = 
VAR _SUM=CALCULATE( sum('Table'[Count]) ,ALLEXCEPT('Table','Table'[Letter]))
return SWITCH(TRUE(),_SUM<5,"1-5",_SUM<10,"5-10")

1.PNG





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

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.