cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Marck
Helper I
Helper I

How to recreate Tableau conditional functions in Powerbi? (See example)

Hello,

 

I am new in Powerbi and I would like to create the following Tableau function  in Powerbi.

If [account]="A"

or [account]="B"

or [account]="C"

then [A/B/C Goal/Event Ratio]

 

ELSEIF [account]="D"

then[D Goal/Event Ratio]

 

ELSEIF [account]= "E"

Then [E Goal/Event Ratio ]

END

 

 

I know that there is an option for conditional column. However, in my case I am using a table created inside Powerbi by unioning different queries.

 

Please someone can help me with this?

 

Thank you

1 ACCEPTED SOLUTION
amitchandak
Super User IV
Super User IV

@Marck , Try  like

 

Switch( True() ,
[account] in {"A","B","C"} , [A/B/C Goal/Event Ratio],
[account]="D",[D Goal/Event Ratio],
[account]= "E", [E Goal/Event Ratio ]
)



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
amitchandak
Super User IV
Super User IV

@Marck , Try  like

 

Switch( True() ,
[account] in {"A","B","C"} , [A/B/C Goal/Event Ratio],
[account]="D",[D Goal/Event Ratio],
[account]= "E", [E Goal/Event Ratio ]
)



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Thank you

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors