Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Note the far right column is what I am trying to return.
My current code looks like this:
Solved! Go to Solution.
Hi @nickc_innova
Please refer to attached sample file with the solution
Previous Worker Value =
CALCULATE (
SUM ( 'Table'[Value] ),
TREATAS ( { 'Table'[Previous Worker] }, 'Table'[Assigned Worker] ),
ALLEXCEPT ( 'Table', 'Table'[Job Id] )
)
Hi,
I assume you want to create a calculated column.
Please check the below picture and the DAX formula.
Previous Worker Value CC =
LOOKUPVALUE (
Data[Value],
Data[Assigned Worker], Data[Previous Worker],
Data[Job ID], Data[Job ID]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
This results in an error. "A table of multiple values was supplied where a single value was expected".
For some Jobs, the assigned worker is reported more than once with different values. So, when looking up the previous worker, we get more than one result.
... need some way to summarize values where job and assigned worker or previous worker match
Hi @nickc_innova
Please refer to attached sample file with the solution
Previous Worker Value =
CALCULATE (
SUM ( 'Table'[Value] ),
TREATAS ( { 'Table'[Previous Worker] }, 'Table'[Assigned Worker] ),
ALLEXCEPT ( 'Table', 'Table'[Job Id] )
)
@tamerj1, thank you so much! Not only did you provide a perfect solution but you also introduced me to something new. I did not know about the TREATAS function. Very interesting.
User | Count |
---|---|
42 | |
28 | |
24 | |
20 | |
16 |
User | Count |
---|---|
54 | |
35 | |
18 | |
18 | |
15 |