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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

undefined

Can I create a sum measure from a measure?

I have calculated the positive values from all values in the table visual with visual level filter but i want sum of positive values in card also. Is this possible to get this ? 

5 REPLIES 5
amitchandak
Super User
Super User

To Calculate a filter over measure you need group it some level and then filter. Typically Values, addcolumns or summarize are used to do that.

 

Please refer to this post, there are few solutions

https://community.powerbi.com/t5/Desktop/Filter-by-the-sum-of-a-column-where-value-of-another-column...

 

CALCULATE(COUNTX(filter(SUMMARIZE(Sales,'Date'[date],"s1",SUM(Sales[Sales Amount])),[s1]>120),[s1])

'

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
rajulshah
Resident Rockstar
Resident Rockstar

Hello @Anonymous,

I didn't really understand what is required. But maybe the following link can help you.
https://community.powerbi.com/t5/Desktop/Sum-of-values-in-a-measure-with-divide-measure/m-p/296768#M130947

Or if you provide sample data and expected results, I could help you in a better way.

Anonymous
Not applicable

Hi @Anonymous ,

 

If you want to get the sum result of your measure in a card, I think you just need to pull your measure into the card, that will be fine.

 

If you want to use measure to do the positive calculation, you can try below measure:

positive measure = calculate([your_measure],[your_measure] >0)

 

Please try.

Aiolos Zhao

Anonymous
Not applicable

Thanks for your reply @Aiolos Zhao

I am getting this error.(A function CALCULATE has been used in a true/false expression that is used as a table filter expression. This is not allowed ) 😞

 

 

Anonymous
Not applicable

Hi @Anonymous ,

 

Sorry, please try below measure, I make it in my report.

 

CALCULATE([your_measure],FILTER('your_table',[your_measure] > 0))
 
Aiolos Zhao

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors