Forum Discussion
Error Reading Meaning?
Hello all,
I have a dashboard of data that I update twice a year with the same data metrics from the previous 6 months. This time, when I appended my new data to the cumulative dataset, some of the location data or relationships aren't working.
Example: I have cards on the dashboard that show:
1. Total Count of Sales (Cumulative Total)
2. Total Sum of Sales (Cumulative Total)
3. Total Count of Sales [in Specific Geogrpahy] (Cumlative Total)
4. Total Sum of Sales [in Specific Geography] (Cumulative Total).
I have metrics of state and county, with a relationship to another data table of county, state that qualifies as a "specfiic geography." I then have a merged column that combined the "county" and "state" into one so it can filter as a "Yes" or "no" for the speicifc geography, and measures to calculate the count and amount of of the new cumulative totals.
For this round, someting isn't working. It added the new data to the total count and total sum of sales, but the specific georgraphies are the same as last time (not connecting to the new data, which I know has sales in specific geographies that aren't being recognized).
The following error came up when using the same measures and calculations as last time:
MdxScript(Model), (7,7) Calculation Error in Measure "geogrpahy table name"[specific values]: The funciton SUMX cannot work with the values of type String.
I should also mention that the merged column I recreated to incorporate the newly appended data now doesn't show all of my cumulative data, as it's misising a lot of state and county data that is in the individual data sets, but is not showing up in the appended cumulative table.
Any and all help would be greatly appreciated, and lessons on what I did wrong to avoid this again would be also appreciated.
Thanks in advance!
- Anonymous2 years ago
Hi W2SANC ,
According to the error message: In your measure[specific values], the SumX() function was used to perform an aggregation operation on string-formatted data resulting in the error.
Generally speaking, SumX() will perform aggregation operations on numeric format data, if you want the public announcement to take effect, you may consider changing the string format data to numeric type, or if you want to perform calculations on the string format data, you can use the MaxX () function or Minx() function, these two functions to see the maximum and minimum value of the text/numeric data type.
SUMX function (DAX) - DAX | Microsoft Learn
MAXX function (DAX) - DAX | Microsoft Learn
MINX function (DAX) - DAX | Microsoft Learn
Or use the Value() function in the formula to change the string to a numeric value:
VALUE function (DAX) - DAX | Microsoft Learn
This is the related document, you can view this content:
Solved: Using Measures: The function SUM cannot work with ... - Microsoft Fabric Community
Solved: The function SUMX cannot work with values of type ... - Microsoft Fabric Community
powerbi - The function SUM cannot work with value of type string Power BI - Stack Overflow
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi W2SANC ,
According to the error message: In your measure[specific values], the SumX() function was used to perform an aggregation operation on string-formatted data resulting in the error.
Generally speaking, SumX() will perform aggregation operations on numeric format data, if you want the public announcement to take effect, you may consider changing the string format data to numeric type, or if you want to perform calculations on the string format data, you can use the MaxX () function or Minx() function, these two functions to see the maximum and minimum value of the text/numeric data type.
SUMX function (DAX) - DAX | Microsoft Learn
MAXX function (DAX) - DAX | Microsoft Learn
MINX function (DAX) - DAX | Microsoft Learn
Or use the Value() function in the formula to change the string to a numeric value:
VALUE function (DAX) - DAX | Microsoft Learn
This is the related document, you can view this content:
Solved: Using Measures: The function SUM cannot work with ... - Microsoft Fabric Community
Solved: The function SUMX cannot work with values of type ... - Microsoft Fabric Community
powerbi - The function SUM cannot work with value of type string Power BI - Stack Overflow
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.