I am wanting to write a measure which will allow me to do 3 different sums depending on what string is found in a column. For example imagine a nutrition table of which we will focus on two columns. the first column has the labels, Protein, Carbs, and Fat. The second column has a numerical value in grams. I want to use a measure (not a calculated column as I will have other factors which make me need to use a measure) in order to calculate calories in each.
I had hoped something along the lines of
‘Nutrition’[Grams] * (IF([Protein], 4), IF([Carbs], 4), IF([Fat], 9)
Would work