vendredi 7 juin 2019

how to convert ifnull statement in tableau to powerbi dax?

I'm working on a dashboard conversion from tableau to power bi.Stuck with a calculated dimension in tableau that is needed to be converted to powerbi using dax!

By Replacing the IFNULL statement in tableau. I've tried the ISBLANK parameter in dax with an IF statement that should check if the field returns a null value or not.My knowledge on dax is limited, i suppose this problem is really simple but i'm stuck with this for quite hours.

tableau code that is need to be converted to powerbi: if LEFT([Supplier Code],1) = "E" then "Employees Claims" else IF IFNULL(IFNULL([ASL Supplier (SWPS)],IFNULL([Supplier Name],IFNULL([Vendor],[Supplier Code]))),'Not Define')= 'N/A' THEN IFNULL([Vendor],[Supplier Name]) ELSE IFNULL(IFNULL([ASL Supplier (SWPS)],IFNULL([Supplier Name],IFNULL([Vendor],[Supplier Code]))),'Not Define') END END

Power bi code which i've tried: Supplier (swps) = IF(LEFT([Supplier Code],1) = "E", "Employee Claims", IF( IF(ISBLANK(V_FIPnLDashboard_Tne[ASL Supplier (SWPS)]),ISBLANK(V_FIPnLDashboard_Tne[Supplier Name]),ISBLANK(V_FIPnLDashboard_Tne[Supplier Code])),"Not Define") = "N/A")

My code is incomplete as i'm not able to understand the complete break down of the code in tableau.

tableau : if LEFT([Supplier Code],1) = "E" then "Employees Claims" else IF IFNULL(IFNULL([ASL Supplier (SWPS)],IFNULL([Supplier Name],IFNULL([Vendor],[Supplier Code]))),'Not Define')= 'N/A' THEN IFNULL([Vendor],[Supplier Name]) ELSE IFNULL(IFNULL([ASL Supplier (SWPS)],IFNULL([Supplier Name],IFNULL([Vendor],[Supplier Code]))),'Not Define') END END

Expected result is a dimension/column that has the values as the given condition in power bi.

Aucun commentaire:

Enregistrer un commentaire