Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

undefined

I am looking for the answers for this : Mdxscript(Model) (264,25) calculatiuon error in measure 'xyz'[outflow]:Function 'CONTAINSROW' doesnot support comparing values of type text with the values of type number.consider using the value or Format function to convert one of the values.

 

2 ACCEPTED SOLUTIONS

Please try this

Total = CALCULATE(ROUND(SUM('Table'[A]) + SUM('Table'[B]) + SUM('Table'[C])+ SUM('Table'[D]) + SUM('Table'[E]), 0))

I'm not sure how your data is structured, but you van do this Power Query too if you chaning the table format isn't an issue.

  • Highlight all the columns that you want to sum
  • Right click and choose unpivot columns. You will be left with the columns that you didn't highlight and two new column. one showing the column names and another with teh amounts.
  • Load into the report
  • Adapt the measure above to just

    Total = CALCULATE(ROUND(SUM('Table'[Value]), 0))



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


View solution in original post

Anonymous
Not applicable

Thank you for the suggested solution .It worked partially .The main problem is it has some blank values which are not well treated .After replacing blank with zero it worked.

View solution in original post

6 REPLIES 6
Joe_Barry
Super User
Super User

Hi @Anonymous 

 

It seems you are trying to compare two columns that have differnt formatting. This could be a number column being compared to what looks like a number column but is formatted as text. Check both columns to see if they are formatted as numbers

Joe_Barry_0-1726486457891.png

Hope this helps

Joe




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


Anonymous
Not applicable

Thank you Joe for the response.I checked both the columns are in Decimal Format.

Can you share the measure that you trying to implement and a screenshot of the column headers in Power Query ? Hopefully then I can help further




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


Anonymous
Not applicable

the measure i used is :

 

OutFlow sum = ROUND(
CALCULATE(
    SUM(Table name[column name]),
     'Table name'[column name] IN {"x",
"y",
"z",
"A",
"B",
"C",
"U",
"V",
"W",
"M",
"O",
"H",
"L",
"R",
"S",
   }
),0

)
AND THE COLUMN NAMES HAS VALUES LIKE 124.90,3747632965234756.05,76443765,5 ETC

Please try this

Total = CALCULATE(ROUND(SUM('Table'[A]) + SUM('Table'[B]) + SUM('Table'[C])+ SUM('Table'[D]) + SUM('Table'[E]), 0))

I'm not sure how your data is structured, but you van do this Power Query too if you chaning the table format isn't an issue.

  • Highlight all the columns that you want to sum
  • Right click and choose unpivot columns. You will be left with the columns that you didn't highlight and two new column. one showing the column names and another with teh amounts.
  • Load into the report
  • Adapt the measure above to just

    Total = CALCULATE(ROUND(SUM('Table'[Value]), 0))



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


Anonymous
Not applicable

Thank you for the suggested solution .It worked partially .The main problem is it has some blank values which are not well treated .After replacing blank with zero it worked.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors