Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Convert Tableau function into Power BI Dax

sum(if [AUDITOR]<>[Auditor Filter] then [NC] else 0 end ) / sum(if [AUDITOR]<>[Auditor Filter] then [APPEAR] else 0 end )

here AUDITOR = Auditor filter, and Auditor filter is used as Parameter . 
need to convert this Tableau fnction into Power BI dax 

3 Replies

  • Anonymous , a new measure

    Divide(

    sumX(Table, if( [AUDITOR]<>[Auditor Filter] ,[NC] ,0 ) ) , sumX(Table,if( [AUDITOR]<>[Auditor Filter] ,[APPEAR] , 0 )))

  • Anonymous's avatar
    Anonymous
    Not applicable

    we didnt get the expected output, all values are blank.

    • v-chenwuz-msft's avatar
      v-chenwuz-msft
      Community Support

      Hi Anonymous ,

       

      It had to convert it without data, please share some sample data and expect result.

      Or you can try this:

      Measure =
      DIVIDE(
          SUMX( FILTER( ALL( 'Table' ), 'Table'[AUDITOR] <> [Auditor Filter] ), [NC] ),
          SUMX( FILTER( ALL( 'Table' ), 'Table'[AUDITOR] <> [Auditor Filter] ),  [APPEAR] )
      )
      

       

      Best Regards

      Community Support Team _ chenwu zhu

       

      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.