Forum Discussion
Using measures in calculated columns
Did you find a solution to this? I'm facing a similar issue.
I have a measure that calculates the maximum value in a column on one table. In this case, it is finding the most recent month for which certain information was entered.
- EOMI_LM = max('WInventory)'[Combined Date (Numeric)])
If I place the measure on a visualization page, it will show the current value for it. Currently that expression yields: 201702
Now I want to use the measure in a formula for a calculated column in another table. But it doesn't work. The wrong result will be shown.
- EOMILen_LM = sumx(filter(filter('WInventory','WInventory'[Part #]=zLKPIM[Product #]),'WInventory'[Combined Date (Numeric)]=EOMI_LM),'WInventory'[Pieces on Hand])
However, if I substitute the Measure's formula instead of its name, the calculation will work.
- EOMILen_LM = sumx(filter(filter('WInventory','WInventory'[Part #]=zLKPIM[Product #]),'WInventory'[Combined Date (Numeric)]=max('WInventory'[Combined Date (Numeric)])),'WInventory'[Pieces on Hand])
Or, if I substitute the static value it will also work.
- EOMILen_LM = sumx(filter(filter('WInventory','WInventory'[Part #]=zLKPIM[Product #]),'WInventory'[Combined Date (Numeric)]=201702),'WInventory'[Pieces on Hand])
So then why doesn't it work when I just reference the name? Why can't I use that measure like a variable in the formula for other calculated columns?
Steve
I have a similar problem. Any response on this please?