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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.