Validate that the percentages add up to 100%

I have a multi-select question that asks what food the respondent eats. The answer choices include rice, chicken, beef, vegetable and other. Depending on what answer/s the respondent chooses, follow-up questions pop up asking what percentage of the daily calorie intake comes from each of the answer choices the respondent picked. For example, suppose, the respondent picked rice and chicken. So the first follow-up question would be what percentage of the respondent’s daily calorie intake comes from rice? The second one: what percentage of the respondent’s calorie intake comes from chicken?

Now, I want to make sure that the percentage that the respondent gives for each food she/he eats adds up to 100%, if not then a warning message should pop up. How can I implement this?

I know how to do this using Validation Condition for single-response questions. But I am not sure in this case. Any help will be greatly appreciated.

See the answer here:

Not related to the syntax, but to subject matter. If I am asked these questions, I would have absolutely no idea about the proportion of calories. This may be the ultimate goal of the study, but not a question you put in the questionnaire. Instead these studies ask typically: “What did you eat last week?” and “How much of X did you eat?” for every item, then convert each item into calories using caloric content reference tables. From that data these proportions can then be calculated.

I just made up these questions to clarify my issue. These questions have got nothing to do with my survey topic. To maintain confidentiality, I could not share my actual questions.