Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear all,
I've an issue with the last version of Power BI (2.84.981.0 64-bit (august 2020)). I've opened an old report, last modified on 08th June 2020 (it work well with no problem), and I've added a new table from my database (the same of the report) using SQL server and directquery, no problems in this operation. I've converted the data type of a column from nvarchar to integer in the main page and then I've created a simple measure (SUM (table_name [column_name]), but when I've tried to create a visual object is occurred this error "OPERAND DATA TYPE NVARCHAR IS INVALID FOR SUM OPERATOR..". How I can solve the problem? I know that with directquery I can not change data type in power query mode, but I don't want to shape data before import.
Thanks for your help
Solved! Go to Solution.
Hi @Malo ,
You could create a measure using VALUE() function to convert text to number.
Then use SUMX() function to calculate the sum of measure.
Measure = VALUE(SELECTEDVALUE('Table'[Column1]))
Measure 2 = SUMX('Table',[Measure])
Best Regards,
Jay
Hi @Malo ,
You could create a measure using VALUE() function to convert text to number.
Then use SUMX() function to calculate the sum of measure.
Measure = VALUE(SELECTEDVALUE('Table'[Column1]))
Measure 2 = SUMX('Table',[Measure])
Best Regards,
Jay
Thanks for the solution. It work well
@Malo , please check the data type of the column at the source. It showing it as nvarchar . So you can only have Count /min/max .
Try sum on some numeric column it should work
Thanks for your suggestion
If I try to repeat the same operation on a table already imported, I've no problem. For this reason I've tried to re import like a new table, one I've already imported and I've repeated the same operations, but this time nothing work as in the past.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
52 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |