Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Can anybody provide possible reasons why a measure work on my local/workspace DB, but not a deployed server?
The error message in Power BI when using the measure from the deployed tabular database:
MdxScript(Model) (186, 59) Calculation error in measure function containsrow does not support comparing values of type text with values of type integer
We are using a tabular model.
TIA
I have managed to make a change that gets the measure to generate the correct value, but I still dont understand why the measure would not work in the one and not the other.
The following measure works (generates a value in a visual) on the workspace db on my local machine, but not on the deployed server.
VAR MaxVersion =
CALCULATE (
SELECTEDVALUE ( 'V_fact_OnlineVersion'[Version_Key] ),
'V_DIM_Version'[Version] = [Latest Version (with movement)]
)
VAR MaxStatus =
CALCULATE (
SELECTEDVALUE ( 'V_DIM_RequestStatus'[RequestStatus] ),
FILTER (
ALL ( 'V_fact_OnlineVersion' ),
'V_fact_OnlineVersion'[Request_Key] = 'V_fact_OnlineVersion'[Request_Key]
&& 'V_fact_OnlineVersion'[Version_Key] = MaxVersion
)
)
RETURN
MaxStatus
The same measure gives the following error when deployed on the deployed server and hence the visual does not generate:
The measure error message says the following:
Expression: A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
By adding changing SELECTEDVALUE to MAX and adding FILTER ( ALL ( ... to the measure as follows, I get the measure to work on the deployed server:
VAR MaxVersion =
CALCULATE (
MAX ( 'V_fact_OnlineVersion'[Version_Key] ), FILTER ( ALL ( 'V_DIM_Version'[Version] )
'V_DIM_Version'[Version] = [Latest Version (with movement)]
)
Can somebody please explain this to me?
@ValtteriN
@amitchandak
@Anonymous @Anonymous @v-yueyunzh-msft
Hi,
It is likely your columns data type is "any" in the tabular db. When the data is loaded PQ will automatically determine data type for the column resulting in the error.
E.g:
Now when I manually change the data type this happens:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Proud to be a Super User!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 13 | |
| 10 |