Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Create DAX measure from Excel Formula

Hello-   I am looking to re-create the below excel formula using DAX in Power BI.     When I do it in Power BI, I get column results: 23 17 18 0 0 0   The end column result should ...
  • az38's avatar
    6 years ago

    Hi Anonymous 

    try column

    Column = if([2020 Forecast_]=0;average(Table1[2020 Forecast_]);[2020 Forecast_])

    if you do not need a row context

    and column

    Column = if([2020 Forecast_]=0;calculate(average(Table1[2020 Forecast_]);ALL(Table1));[2020 Forecast_])

    if you do need

     

    do not hesitate to give a kudo to useful posts and mark solutions as solution