Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need help with an expression that I am using in a straight table to calculate a weighted average.
This is the expression:
=(Field_1*Field_2) /
(sum(total if((STATUS <> 'X' and STATUS <> 'C') and (DESC = 1 or DESC = 3 or DESC = 7), Field_2)))
I need the denominator to remain the same regardless of the current selection, but it is changing when I make a selection. How do I prevent this? I should note that putting a {1} won't work since I am looking at data based on the date so I need to leave that filter in place.
Thank you!
Unless you put {1}, your denominator of your expression will change. You can may be tell it to change on date and not on anything else:
{1<Date = {'*'}>}
HTH
Best,
Sunny
Hi Matthew!
Can you attach your model?
Try this expression (replace Date with your date field name)
=(Field_1 * Field_2) /
(Sum({1<Date = {'*'}>} TOTAL If((STATUS <> 'X' and STATUS <> 'C') and (DESC = 1 or DESC = 3 or DESC = 7), Field_2)))
Best,
Sunny