Forum Discussion
Tableau calculation to power bi
- 2 years ago
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.
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.