Forum Discussion
patoduck
6 years agoHelper III
Creating lists / tables for AB testing
Imagine you are working for a company that have, let's say it has 10 branches. Your task is to create lists for A/B testing, so you need to prepare a new colum classifies customers in category A or ...
- 6 years ago
Hi patoduck
Sorry but I'm not sure if I understand your requirement, are you looking to create a column that alternates between a and b?
If so please consider the below solution.=if Number.IsOdd( [Kunde] ) then "A" else "B"Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
Mariusz
6 years agoCommunity Champion
Hi patoduck
Sorry but I'm not sure if I understand your requirement, are you looking to create a column that alternates between a and b?
If so please consider the below solution.
=if Number.IsOdd( [Kunde] ) then "A" else "B"
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
patoduck
6 years agoHelper III
At the end i did it on SQL rank () over (partition by Banknr order by CustomerNr ) as ranking and then use a CASE with (ranking % 2) <> 0 to find odd and even numbers.
In Power BI you can do it by creating an index Group By and then as suggested by Marius use
Number.IsOdd =if Number.IsOdd( [Kunde] ) then "A" else "B"