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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ekoland88
Frequent Visitor

Aggregation only for values greater than 0

Totals.JPG

Hi all,

I have the above table on power bi.

Description is a category of products, Quantity to expire is a measure from Stock table, Forecast is another measure from Forecast table. Risc BDD is Quantity-Forecast.

How can I show as Total on Risc BDD column only the 617 not all the aggregation which shows -11581 result.

Thank you!

1 ACCEPTED SOLUTION

@ekoland88 , I think this should work

if([RiskBDD]>0, [RISK BDD],0)

 

But if do not get a grand total

Try sumx(table,if([RiskBDD]>0, [RISK BDD],0))

or  sumx(values(table[description]),if([RiskBDD]>0, [RISK BDD],0))

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

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@ekoland88 , Assuming [RISK BDD] is a measure

 

sumx(table,if([RiskBDD]>0, [RISK BDD],0))

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

Yes, RiskBDD is indeed a measure but what table should I use in the sumx? 

@ekoland88 , I think this should work

if([RiskBDD]>0, [RISK BDD],0)

 

But if do not get a grand total

Try sumx(table,if([RiskBDD]>0, [RISK BDD],0))

or  sumx(values(table[description]),if([RiskBDD]>0, [RISK BDD],0))

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors