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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi Team
im trying to get the logic of how i would make this work so that it can dispay everything not just the first command under Custom column, Please help
if[AffiliateOwnerID]=2 and [ActivityTypeID]=1 or[ActivityTypeID]=2 then 2
else if [AffiliateOwnerID]=2 and [ActivityTypeID]=1 or[ActivityTypeID]=2 then 3
else if [AffiliateOwnerID]=2 and [ActivityTypeID]=1 or[ActivityTypeID]=2 then 5
Reason why we need 3 targets under one activity is because we wat to asign each target to a certain percentage like on the screen shot below
Hi again @Anonymous ,
Let's see if I understood it now.
You start with something like this:
And want to end up with something like this:
If so, here is my proposal:
1. Create an Aux table like this one (named Target in my example):
2. Add a Custom Column to your main table with the following code:
Table.SelectRows(Target, (X)=> List.Contains({1,2},[ActivityTypeID]) and [AffiliateOwnerID] = 2)
3. Expand it:
Hi @Anonymous ,
Aren't all the if-conditions the same here?
Hi @Payeras_BI
if you check, we need to have a target of 2,3 and 5 for the same activities ID under the same affiliate owner.
so the logic is that we want all those targets to show on that column so we can calculate the SLA % to indcate that
2=70%
3=85%
5=95%
i hope this will make it easy for you to understand the logic
Hi @Anonymous ,
Not sure if this is what you are looking for but try with this instead to get an idea of why the previous code was not working and take it from there.
= if[AffiliateOwnerID]=2 and ([ActivityTypeID]=1 or[ActivityTypeID]=2) then 2
else if [AffiliateOwnerID]=3 and ([ActivityTypeID]=1 or[ActivityTypeID]=2) then 3
else if [AffiliateOwnerID]=5 and ([ActivityTypeID]=1 or[ActivityTypeID]=2) then 5
else null
Hi @Payeras_BI it is for the same affilate owner that have affiliate owner 2, it just have 3 different targets. Do you perhaps have an idea of how we can achieve that
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
6 | |
3 | |
3 | |
3 |
User | Count |
---|---|
13 | |
11 | |
9 | |
8 | |
8 |