Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I need help in converting the tableau calculation to Power BI. I find it a bit difficult in converting.
IF([As Set] = True and [name Set] = True) then [Column A]
elseif ([As Set] = True and [name Set] = False) then [column B]
else "" end
Help with this will be very helpful.
Thanks in advance.
Solved! Go to Solution.
Hi @asdf1608
If you want to transfer it to a calculated column:
column=switch(true(),[As Set] = True() && [name Set] = True(),[Column A],[As Set] = True()&&[name Set] = False(),[column B],"")
If you want to transfer it to a measure:
measure=switch(true(),max([As Set]) = True() && max([name Set]) = True(),max([Column A]),max([As Set])= True()&&max([name Set]) = False(),max([column B]),"")
If you want to transferi it in power query:
= Table.AddColumn(#"Changed Type", "Custom", each if [As Set] = true and [name set]= true then [Column A] else if [As set]=true and [name Set]=false then [column B] else "")
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @asdf1608
If you want to transfer it to a calculated column:
column=switch(true(),[As Set] = True() && [name Set] = True(),[Column A],[As Set] = True()&&[name Set] = False(),[column B],"")
If you want to transfer it to a measure:
measure=switch(true(),max([As Set]) = True() && max([name Set]) = True(),max([Column A]),max([As Set])= True()&&max([name Set]) = False(),max([column B]),"")
If you want to transferi it in power query:
= Table.AddColumn(#"Changed Type", "Custom", each if [As Set] = true and [name set]= true then [Column A] else if [As set]=true and [name Set]=false then [column B] else "")
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@asdf1608 try the following. Replace the <>s and their contents with the appropriate values. I'm making the assumption that this is for a calculated column.
<Column Name> =
IF (
'<table name>'[As Set] = TRUE,
IF (
'<table name>'[name Set] = TRUE,
'<table name>'[Column A],
'<table name>'[Column B]
),
""
)
If this gets you what you need, please mark this as the solution.
@giammariam. I tried the same way you mentioned but I am getting the following error message.
Why is this occuring? How can I solve this
How are the [As Set] and [name Set] columns formatted? I assumed they were booleans, but based on the error it sounds like they are formatted as text. If they are formatted as text, try this:
<Column Name> =
IF (
'<table name>'[As Set] = "True",
IF (
'<table name>'[name Set] = "True",
'<table name>'[Column A],
'<table name>'[Column B]
),
""
)
@giammariam I created the column but I get this as count of column. Why is that?
@asdf1608 what visual are you using? Make sure to check the aggregation setting for the new column and use the one you need or use do not summarize. See below link:
https://learn.microsoft.com/en-us/power-bi/create-reports/service-aggregates
It worked. Thanks