Hi Power Query gurus out there!
I'm going to do my best to explain some help that I need it replacing values, conditionally based on another column's values, while dynamically referencing field names.
Here's some sample data:
I want to replace any values in the "Max Points" columns (the last 4) with zero if the corresponding non-"Max Points" columns' values are null. I need this to be dynamic in case I add more fields. The "Max Points" fields will always be identical to the non-"Max Points" fields with the exception of the " Max Points". I believe I may need to use a function like "each Record.Field", but not sure how to make it dynamic enough to replace the values with zero in the "Max Points" field by looking for nulls in the same field name without " Max Points".
I totally understand how complicated I made that sound, but not sure how else to phrase it...LOL!
So in the above above data set, I want to replace the 4th record in "Appreciate Patience (if hold was used) Max Points" with zero because "Appreciate Patience (if hold was used)" is null. Similarly, records 1, 2, 5 and 6 in "Discuss Follow-Up Max Points" should be zero and same with the last record for "Resolution Statement Max Points"
I understand I can do this by referencing each column separately, but I want this to be dynamic enough for future changes.
Any help would be greatly appreciated! Thank you in advance!
I'm going to do my best to explain some help that I need it replacing values, conditionally based on another column's values, while dynamically referencing field names.
Here's some sample data:
Date | Greeting | Appreciate Patience (if hold was used) | Resolution Statement | Discuss Follow-Up | Greeting Max Points | Appreciate Patience (if hold was used) Max Points | Resolution Statement Max Points | Discuss Follow-Up Max Points |
8-22-2022 | 5 | 0 | 20 | 5 | 5 | 20 | 20 | |
8-24-2022 | 5 | 2.5 | 20 | 5 | 5 | 20 | 20 | |
8-23-2022 | 5 | 5 | 0 | 20 | 5 | 5 | 20 | 20 |
8-24-2022 | 5 | 20 | 20 | 5 | 5 | 20 | 20 | |
8-25-2022 | 5 | 2.5 | 0 | 5 | 5 | 20 | 20 | |
8-26-2022 | 5 | 5 | 5 | 5 | 20 | 20 |
I want to replace any values in the "Max Points" columns (the last 4) with zero if the corresponding non-"Max Points" columns' values are null. I need this to be dynamic in case I add more fields. The "Max Points" fields will always be identical to the non-"Max Points" fields with the exception of the " Max Points". I believe I may need to use a function like "each Record.Field", but not sure how to make it dynamic enough to replace the values with zero in the "Max Points" field by looking for nulls in the same field name without " Max Points".
I totally understand how complicated I made that sound, but not sure how else to phrase it...LOL!
So in the above above data set, I want to replace the 4th record in "Appreciate Patience (if hold was used) Max Points" with zero because "Appreciate Patience (if hold was used)" is null. Similarly, records 1, 2, 5 and 6 in "Discuss Follow-Up Max Points" should be zero and same with the last record for "Resolution Statement Max Points"
I understand I can do this by referencing each column separately, but I want this to be dynamic enough for future changes.
Any help would be greatly appreciated! Thank you in advance!