Forum Discussion
Sriku
Helper IV
6 years agoCalculate nested if in power query
Hi, I need to calculate Percentage in power query. If Country = India then (Available - (DowntimeHrs/7.5)- Required)/Required ) and for other country (Available - (DowntimeHrs/6.5)- Required)/Req...
AllisonKennedy
Community Champion
6 years agoYou should be able to do this in Power Query using the built in functionality.
Click the Add Column tab, then choose 'conditional column'.
You can add a row to add more conditions, but your formula only needs one condition - change the type from value to column and choose the [Country] column. Then type India in the box.
Then choose column for the 'then' box. and pick the 'Available' column. Do the same for the 'else' box.
Then turn on your formula bar (click on View tab in Power Query) and manually edit the formula to provide the conditions using the same syntax and pattern already put in place for you.
Click the Add Column tab, then choose 'conditional column'.
You can add a row to add more conditions, but your formula only needs one condition - change the type from value to column and choose the [Country] column. Then type India in the box.
Then choose column for the 'then' box. and pick the 'Available' column. Do the same for the 'else' box.
Then turn on your formula bar (click on View tab in Power Query) and manually edit the formula to provide the conditions using the same syntax and pattern already put in place for you.
Sriku
Helper IV
6 years agoI am a learner to powerbi can you please help me in sharing in screen shot or share the logic applied in Powerbi