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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors