Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I am new to Power BI and just learning on my own. Is it possible to assign rows based on another column aside from the parent-child relationship?
Here is an example of what I want to achieve:
Always assign the row (whether Parent or Item) to the owner of an Item task with a Work Type = "Dev". If there is no Dev work type (ex. Item id = "4"), assign it to the owner with a Work Type = "QA".
Solved! Go to Solution.
Hi @ErPat
I found that based on your requirement, the assigned to fot the 2 Item should be Peter, but your picture displayed that is belong to James, is it wrong?
Based on my understanding, I create the following sample, and you can refer to.
the sample data is the same as you provided, you can create a calculated column in table.
Column =
VAR _dev =
MAXX (
FILTER (
'Table',
OR (
[Parent Id] = EARLIER ( 'Table'[Item Id] ),
[Parent Id] = EARLIER ( 'Table'[Parent Id] )
)
&& [Work Type] = "Dev"
),
[Owner]
)
VAR _qa =
MAXX (
FILTER (
'Table',
OR (
[Parent Id] = EARLIER ( 'Table'[Item Id] ),
[Parent Id] = EARLIER ( 'Table'[Parent Id] )
)
&& [Work Type] = "QA"
),
[Owner]
)
RETURN
IF ( _dev <> BLANK (), _dev, _qa )
Output
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 @ErPat
I found that based on your requirement, the assigned to fot the 2 Item should be Peter, but your picture displayed that is belong to James, is it wrong?
Based on my understanding, I create the following sample, and you can refer to.
the sample data is the same as you provided, you can create a calculated column in table.
Column =
VAR _dev =
MAXX (
FILTER (
'Table',
OR (
[Parent Id] = EARLIER ( 'Table'[Item Id] ),
[Parent Id] = EARLIER ( 'Table'[Parent Id] )
)
&& [Work Type] = "Dev"
),
[Owner]
)
VAR _qa =
MAXX (
FILTER (
'Table',
OR (
[Parent Id] = EARLIER ( 'Table'[Item Id] ),
[Parent Id] = EARLIER ( 'Table'[Parent Id] )
)
&& [Work Type] = "QA"
),
[Owner]
)
RETURN
IF ( _dev <> BLANK (), _dev, _qa )
Output
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.
Thank you very much @v-xinruzhu-msft! You are correct that Peter should be assigned to Item 2.
Does the data in your solution have to be sorted in some way? I ask because [Owners] from old records somehow gets assigned to current records even though they are not tied to it. I wish I can share with you sample data but I am constrained in doing so.
Your solution is a very good starting point. Although, I don't fully understand how it works, I will play around it and hopefully get the data I need. Otherwise, I'll go back to this thread again for more questions.
Thanks again!
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
88 | |
87 | |
35 | |
35 |
User | Count |
---|---|
154 | |
100 | |
83 | |
63 | |
54 |