Calculate value of a row based on condition in another column
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
tsong57
5 - Atom
‎04-23-2024
11:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I am looking for a way to automatically calculate the highlighted numbers in the example dataset below. The WTD for a particular year is equal to the number in the same Value column when WTD Condition is "x". The MTD for a particular year is the sum of number in Value when MTD Condition is "x". Is there a way to calculate this using the multi-row field tool? Thank you in advance!
Year | Week | Value | WTD Condition | MTD Condition |
2023 | week 1 | 74 | x | |
2023 | week 2 | 92 | x | x |
2023 | week 3 | 99 | ||
2023 | week 4 | 50 | ||
2023 | WTD | 92 | ||
2023 | MTD | 166 | ||
2024 | week 1 | 6 | x | |
2024 | week 2 | 29 | x | x |
2024 | week 3 | 85 | ||
2024 | week 4 | 49 | ||
2024 | WTD | 29 | ||
2024 | MTD | 35 | ||
2025 | week 1 | 80 | x | |
2025 | week 2 | 87 | x | x |
2025 | week 3 | 5 | ||
2025 | week 4 | 27 | ||
2025 | WTD | 87 | ||
2025 | MTD | 167 |
Labels:
- Labels:
- Data Investigation
- Datasets
- Help
- Transformation
2 REPLIES 2
aatalai
14 - Magnetar
‎04-24-2024
12:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
21 - Polaris
‎04-24-2024
01:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@tsong57
Maybe we can try a bit more dynamic way as below.
I alway like the tool "Transpose" and "Cross Tab", which are powerful for multi-column data processing.
