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
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!