Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
kasai16
Regular Visitor

Tableau calculation to power bi

Can someone help me to convert below Tableau calculation field or formulla to Power Bi....

 

IF ATTR([Column Name])!="Column Value" THEN IF (ZN([Parameter A]) - LOOKUP(ZN([Parameter A]), FIRST())) / ABS(LOOKUP(ZN([Parameter A]), FIRST())) != -1 THEN ZN([Parameter A]) - LOOKUP(ZN([Parameter A]), FIRST()) END END

 

 

1 ACCEPTED SOLUTION
VN999
Resolver I
Resolver I

Try with below Dax code and compare the output results b/w Tableau and Power Bi Calculated columns.

Result =
IF (
NOT(ISBLANK('Table'[Column Name])) && 'Table'[Column Name] <> "Column Value",
VAR ParameterA = 'Table'[Parameter A]
VAR FirstParameterA = CALCULATE(
FIRSTNONBLANK('Table'[Parameter A], 1),
FILTER(ALL('Table'), 'Table'[Column Name] <> "Column Value")
)
RETURN
IF (
ParameterA <> BLANK() && FirstParameterA <> BLANK() && FirstParameterA <> 0,
(ParameterA - FirstParameterA) / ABS(FirstParameterA),
BLANK()
)
)

 

Replace with PowerBI table names and columns.

View solution in original post

2 REPLIES 2
kasai16
Regular Visitor

Thanks for helping. however, it is not working and getting error stating Consider using the VALUE or FORMAT function to convert one of the values., Can you help bit more in simple way please? 

Here in the below formullas - Column name is from Table or Data source table and Column value is the value showing under column name. Measure and Measure2 are the calculated fileds from Tableau. 

 

Formulla 1

IF ATTR([Column Name])!="Column Value" THEN IF (ZN([Measure]) - LOOKUP(ZN([Measure]), FIRST())) / ABS(LOOKUP(ZN([Measure]), FIRST())) != -1 THEN ZN([Measure]) - LOOKUP(ZN([Measure]), FIRST()) END END

 

Formulla 2

IF ATTR([Column Name])!="Column Value" THEN IF (ZN([Measure]) - LOOKUP(ZN([Measure]), FIRST())) / ABS(LOOKUP(ZN([Measure]), FIRST())) != -1 THEN (ZN([Measure]) - LOOKUP(ZN([Measure]), FIRST())) / ABS(LOOKUP(ZN([Measure]), FIRST())) END END

 

Formulla 3

IF ATTR([Column Name])!="Column Value" THEN IF (ZN([Measure]) - LOOKUP(ZN([Measure]), FIRST())) / ABS(LOOKUP(ZN([Measure]), FIRST())) != -1 THEN ZN([Measure2]) - LOOKUP(ZN([Measure2])) END END

VN999
Resolver I
Resolver I

Try with below Dax code and compare the output results b/w Tableau and Power Bi Calculated columns.

Result =
IF (
NOT(ISBLANK('Table'[Column Name])) && 'Table'[Column Name] <> "Column Value",
VAR ParameterA = 'Table'[Parameter A]
VAR FirstParameterA = CALCULATE(
FIRSTNONBLANK('Table'[Parameter A], 1),
FILTER(ALL('Table'), 'Table'[Column Name] <> "Column Value")
)
RETURN
IF (
ParameterA <> BLANK() && FirstParameterA <> BLANK() && FirstParameterA <> 0,
(ParameterA - FirstParameterA) / ABS(FirstParameterA),
BLANK()
)
)

 

Replace with PowerBI table names and columns.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.