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
vanessafvg
Super User
Super User

Calculated measure based on category

I have a measure that i want to use based on summing up the category

 

for example

 

flat type   cost   expected result

100          20       50

100         30       50

200        40      90

200       50     90  

300      60     60

 

 

 

i have hit a total blank this morning, if i want to sum the cost by flat type and store that in a separte column for each row, how do i do this?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




1 ACCEPTED SOLUTION

HI @vanessafvg,

 

Based on my understanding, you want to summary the total cost of the same type, right?

If this is a case, you can refer to below formula:

Calculate column:

Result = SUMX(FILTER(ALL('sample 2'),[flat type]=EARLIER('sample 2'[flat type])),[cost])

Measure:

Result = SUMX(FILTER(ALL('sample 2'),[flat type]=MAX('sample 2'[flat type])),[cost])

 

4.PNG

 

Regards,

Xiaoxin Sheng

 

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
vanessafvg
Super User
Super User

anyone 🙂





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




HI @vanessafvg,

 

Based on my understanding, you want to summary the total cost of the same type, right?

If this is a case, you can refer to below formula:

Calculate column:

Result = SUMX(FILTER(ALL('sample 2'),[flat type]=EARLIER('sample 2'[flat type])),[cost])

Measure:

Result = SUMX(FILTER(ALL('sample 2'),[flat type]=MAX('sample 2'[flat type])),[cost])

 

4.PNG

 

Regards,

Xiaoxin Sheng

 

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.