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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Marango
Regular Visitor

create measures with filters

Hello,

I need to create measures using some filter to be able to make some card visuals.

 

here is what I did:

I have my date base with all years information, so for making the "sales per year"  i made to measures:

2025 = SUM(...) and filtered in 2025 poryjected sales.
2024 =  CALCULATE([Facturación],SAMEPERIODLASTYEAR('Calendar'[Date])) - I created a measure of get the sales of previous year.
 than I made a measure to get  the difference between both 2024 adn 2025 sales.
 
WHAT I SHOULD DO:

I made to charts one "increasing of sales" detailed all the "clientes" that has a positive result and I was using the filter panel. and another of "lost sales"  with all the negative results.

I need to add some cards to summarize the totals.

I have one showing the total of sales in 2025

I need a card showing the total of increaisng sales that is "2,066,314"

and a card showing the total of lost sales that is "-919,865"

 

Marango_0-1734544331817.png

thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thank you lbendlin for your concern.

 

Hi @Marango ,

 

Based on your description I created simple data:

vlinhuizhmsft_0-1734663815945.png

 

You can refer to the following measures to get positive and negative totals:

 

increasing measure = CALCULATE([Measure],FILTER('Table',[Measure]>0))
lost measure = CALCULATE([Measure],FILTER('Table',[Measure]<0))

 

 

Result:

vlinhuizhmsft_1-1734663965260.png

 

Best Regards,
Zhu

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you lbendlin for your concern.

 

Hi @Marango ,

 

Based on your description I created simple data:

vlinhuizhmsft_0-1734663815945.png

 

You can refer to the following measures to get positive and negative totals:

 

increasing measure = CALCULATE([Measure],FILTER('Table',[Measure]>0))
lost measure = CALCULATE([Measure],FILTER('Table',[Measure]<0))

 

 

Result:

vlinhuizhmsft_1-1734663965260.png

 

Best Regards,
Zhu

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.