Forum Discussion
Weighted Average for Email Open Rate
- 9 years ago
That error means OpenRateSum doesn't work as a measure because it's trying to do a Sum on a string, i.e., text. I suspect that the Open Rate is a string in your table, rather than an actual number. 25% is probably the number 25 and then the percent sign, not 0.25.
You should be able to tell in your Edit Queries. The left-hand corner of each column has a symbol that indicates the data type. Open Rate should be 1.2, not ABC. If you see ABC, you might be able to click it and select 1.2 instead and see if it auto-converts correctly, which will depend on how it's stored. If that doesn't work and you're still stuck, post back.
Once that error's cleared, you'll be able to use Weighted Average in the card visual.
Hi KGrice,
Thank you for your help. I followed your directions, however, I received an error message when I tried to use the "Weighted Average" as a card in my dashboard. Do you have ideas what is happening? Below is the message I received:
Error Message:
MdxScript(Model) (1, 47) Calculation error in measure 'Email Stats'[OpenRateSum]: The function SUM takes an argument that evaluates to numbers or dates and cannot work with values of type String.
Stack Trace:
That error means OpenRateSum doesn't work as a measure because it's trying to do a Sum on a string, i.e., text. I suspect that the Open Rate is a string in your table, rather than an actual number. 25% is probably the number 25 and then the percent sign, not 0.25.
You should be able to tell in your Edit Queries. The left-hand corner of each column has a symbol that indicates the data type. Open Rate should be 1.2, not ABC. If you see ABC, you might be able to click it and select 1.2 instead and see if it auto-converts correctly, which will depend on how it's stored. If that doesn't work and you're still stuck, post back.
Once that error's cleared, you'll be able to use Weighted Average in the card visual.