Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi team,
I am having issues while creating new column "Shipping Status" with below logic.
Relationship --> A given project contains multiple tasks. Any help will be much appreciated.
Project | Task Id | Task Name | Shipping Status |
1 | 1 | Task 11 | Pre-Shipping |
1 | 2 | Task 12 | Pre-Shipping |
1 | 3 | Shipping | Shipping |
1 | 4 | Task 14 | Post-Shipping |
1 | 5 | Task 15 | Post-Shipping |
2 | 1 | Task 21 | Pre-Shipping |
2 | 2 | Task 22 | Pre-Shipping |
2 | 3 | Shipping | Shipping |
2 | 4 | Task 23 | Post-Shipping |
Solved! Go to Solution.
Hi, @ankitkalsara
Please try the below for creating a new column.
Shipping Status Column =
VAR currentproject = 'Table'[Project ]
VAR shippingtaskid =
CALCULATE (
SELECTEDVALUE ( 'Table'[Task Id] ),
FILTER (
ALL ( 'Table' ),
'Table'[Project ] = currentproject
&& 'Table'[Task Name] = "Shipping"
)
)
RETURN
SWITCH (
TRUE (),
'Table'[Task Id] < shippingtaskid
&& 'Table'[Project ] = currentproject, "Pre-Shipping",
'Table'[Task Id] > shippingtaskid
&& 'Table'[Project ] = currentproject, "Post-Shipping",
"Shipping"
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: https://www.linkedin.com/in/jihwankim1975/
Hi, @ankitkalsara
Please try the below for creating a new column.
Shipping Status Column =
VAR currentproject = 'Table'[Project ]
VAR shippingtaskid =
CALCULATE (
SELECTEDVALUE ( 'Table'[Task Id] ),
FILTER (
ALL ( 'Table' ),
'Table'[Project ] = currentproject
&& 'Table'[Task Name] = "Shipping"
)
)
RETURN
SWITCH (
TRUE (),
'Table'[Task Id] < shippingtaskid
&& 'Table'[Project ] = currentproject, "Pre-Shipping",
'Table'[Task Id] > shippingtaskid
&& 'Table'[Project ] = currentproject, "Post-Shipping",
"Shipping"
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: https://www.linkedin.com/in/jihwankim1975/
Hi @Jihwan_Kim ,
Thank you very much for the suggestion, it works exactly the way I wanted 🙂
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
8 | |
7 |