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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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

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

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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