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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
PowerNewbie98
New Member

Cannot figure out what formula is appropriate - lookup and sum

Hi all, 

 

I am new to this system and I'm on struggle street trying to figure it out. What I am trying to do is, get powerBI to look up the value (Maybe filter by the value?I'm not sure) 'revenue' from say 'column 1' and find all instances of that word, and then sum the figures in 'column 2' that correspond with it. Any formula suggestions welcome. 

 

Thank you!

 

2 ACCEPTED SOLUTIONS
Idrissshatila
Super User
Super User

Hello @PowerNewbie98 ,

 

try this

 

Measure = calculate( sum(YourTableName[column2]),YourTableName[column1] = "Revenue")

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin
Vote For my Idea💡

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

HEllo @PowerNewbie98 ,

 

try the following 

 

Measure = calculate( sum(YourTableName[column2]),YourTableName[column1] <> "Revenue")

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin
Vote For my Idea💡

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

3 REPLIES 3
PowerNewbie98
New Member

Thanks for that!

 

Would you also happen to know how I could exclude revenue and sum every other category in column 1? my overall aim is to caclculate the gross profit. for eg my data looks sort of like this:

 

Acct Type$
Revenue100
Staples10
Markers20
paper30

HEllo @PowerNewbie98 ,

 

try the following 

 

Measure = calculate( sum(YourTableName[column2]),YourTableName[column1] <> "Revenue")

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin
Vote For my Idea💡

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Idrissshatila
Super User
Super User

Hello @PowerNewbie98 ,

 

try this

 

Measure = calculate( sum(YourTableName[column2]),YourTableName[column1] = "Revenue")

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin
Vote For my Idea💡

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.