Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi everyone,
I am trying to move my reports from Tableau to Power BI and i have some below FIXED function which should be written in DAX.
Can any one please help to convert Tableau LOD to Power BI DAX ?
IF
[Categories]= 'CANDIES' THEN
{ FIXED
[Unique ID],[Categories]
:
IF
[PRECIO PROMEDIO]<450
THEN 'LESS THAN 500'
ELSEIF
[PRECIO PROMEDIO]>450 AND [PRECIO PROMEDIO] =< 550
THEN '$500'
ELSEIF
[PRECIO PROMEDIO]>550 AND [PRECIO PROMEDIO] =< 650
THEN '$600'
ELSEIF
[PRECIO PROMEDIO]>650 THEN 'MORE THAN $600'
END
}
END
Solved! Go to Solution.
Hi @Daxmon_23 ,
Change your formula like below:
Cump =
VAR a =
SWITCH (
TRUE (),
[Precio Prom] < 450, "0-$450",
AND ( [Precio Prom] > 450, [Precio Prom] <= 550 ), "$500",
AND ( [Precio Prom] > 550, [Precio Prom] <= 650 ), "$600",
[Precio Prom] >= 600, "More than $600"
)
RETURN
CALCULATE (
a,
ALLEXCEPT ( Sales, Sales[UniqueID] ),
ALLEXCEPT ( Product, Product[Categories] )
)
or maybe:
Cump =
VAR a =
SWITCH (
TRUE (),
MAX ( DimProduct[Color] ) = "Red", "red",
AND (
MAX ( DimProduct[Color] ) = "Black",
( MAX ( DimProduct[Color] ) = "Grey" )
), "grey",
"Other color"
)
RETURN
CALCULATE ( a, ALLEXCEPT ( DimDate, DimDate[FiscalYear] ) )
If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Daxmon_23 ,
Change your formula like below:
Cump =
VAR a =
SWITCH (
TRUE (),
[Precio Prom] < 450, "0-$450",
AND ( [Precio Prom] > 450, [Precio Prom] <= 550 ), "$500",
AND ( [Precio Prom] > 550, [Precio Prom] <= 650 ), "$600",
[Precio Prom] >= 600, "More than $600"
)
RETURN
CALCULATE (
a,
ALLEXCEPT ( Sales, Sales[UniqueID] ),
ALLEXCEPT ( Product, Product[Categories] )
)
or maybe:
Cump =
VAR a =
SWITCH (
TRUE (),
MAX ( DimProduct[Color] ) = "Red", "red",
AND (
MAX ( DimProduct[Color] ) = "Black",
( MAX ( DimProduct[Color] ) = "Grey" )
), "grey",
"Other color"
)
RETURN
CALCULATE ( a, ALLEXCEPT ( DimDate, DimDate[FiscalYear] ) )
If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Daxmon_23 , I have done a video in the same sometime back, see if that can help
hi @amitchandak , thanks for your help.
My try after seeing it was as follows but I get errors I can't seem to find why
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.