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
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

rajulshah
Super User
Super User

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.

AiolosZhao
Memorable Member
Memorable Member

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





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

Proud to be a Super User!




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 ) 😞

 

 

Hi @Anonymous ,

 

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

 

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




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

Proud to be a Super User!




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.