cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
romovaro
Super User
Super User

Use USD only when Project Health is REd or Orange

HI

 

Trying to replicate the table below in Power BI

romovaro_1-1658494252700.png

 

I have a USD column and a Project Health column. (Values can be "Green", "Red", "Orange", etc...)

The idea is to show total USD in one row and create another mesure called risk where only USD with Project health (RED and ORANGE) are included and extra row for % vs the total.

Tried different formulas but not really working.

 

Risk = CALCULATE(SUM('Weekly Slippage'[USD], FILTER ('Weekly Slippage', 'Weekly Slippage'[Project Health]="Red" || 'Weekly Slippage'[Project Health]="Orange")))
 
any idea?
 
thanks and Happy weekend
1 ACCEPTED SOLUTION
Anonymous
Not applicable

@romovaro check the sum function. you didnt closed the sum function properly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@romovaro Use

Risk = CALCULATE(SUM('Weekly Slippage'[USD], FILTER ('Weekly Slippage', 'Weekly Slippage'[Project Health] IN {"Red" ,"Orange"}))

HI Mohan

 

Thanks for your help

 

Tried your formula but I get an error:

romovaro_0-1658495127347.png

Too many arguments were passed to the SUM function. The maximum argument count for the function is 1.

Anonymous
Not applicable

@romovaro check the sum function. you didnt closed the sum function properly.

Helpful resources

Announcements
Vote for T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors