Forum Discussion
Analysis Services: Negative values are not supported
In Power BI Desktop I'm using Analysis Services as source. I get the following error:
DataSource.Error: AnalysisServices: The argument value passed for Count was negative. Negative values are not supported for Count.
I've checked my data in Power BI but I couldn't find negative values in some Counts that I do. How can I solve this? Do I have to modify my cubes / dimensions in SSAS? If so, what should I do best? Also: is it really negative or can it also be BLANK ?
I have some easy calculations like:
(
[F Patient].[S Patient Status - Naam].&[Wachtlijst],
[Measures].[F Patient Count]
)
I'm not familiar with this error so any help would be appreciated.
Thanks,
Remi.
7 Replies
- AnonymousNot applicable
We are also Experiencing this issue - It appears to come up when you Sort a Column in your query. It took us forever to isolate and reproduce, but removing all column sorts in Power Query Removed the Error
Just have to rely on the Visual to Sort the data 😞
- KVPowerPlatformNew Member
Thanks for this solution, Anonymous!
I removed the sorting in my merged tables per your suggestion and it resolved this issue in my project 🙂
Cheers!
- AnonymousNot applicable
Glad it helped
- v-xuding-msftCommunity Support
Hi RemiAnthonise ,
You could try the function of ISERROR to catch those data.
IF( ISERROR( SUM('ResellerSales_USD'[SalesAmount_USD]) /SUM('InternetSales_USD'[SalesAmount_USD]) ) , BLANK() , SUM('ResellerSales_USD'[SalesAmount_USD]) /SUM('InternetSales_USD'[SalesAmount_USD]) )Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- RemiAnthoniseHelper V
Hi v-xuding-msft Xue,
I'm not sure where it goes wrong. Maybe in my report but like I said: I do some calculations in Analysis Services / SSAS. With the error-message I can't see where it goes wrong as it is not mentioning where. So it can be in my report or in SSAS.
Other strange thing: I don't get it every time I do a refresh. It looks pretty random whether it works or not.
- RemiAnthoniseHelper V
Sometimes my refresh goes well and it's completed without errors. I don't know where and when it goes wrong but for now it looks allright. I successfully uploaded my report to our Report Server and Scheduled Refresh works so for now it looks allright.