cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Analysis Services: Negative values are not supported

In Power BI Desktop I'm using Analysis Services as source. I get the following error:

 

error analysis services.jpg

 

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.

5 REPLIES 5
Highlighted
Community Support
Community Support

Re: Analysis Services: Negative values are not supported

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.

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.
Highlighted
Helper V
Helper V

Re: Analysis Services: Negative values are not supported

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.

Highlighted
Helper V
Helper V

Re: Analysis Services: Negative values are not supported

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.

 

Highlighted
Community Support
Community Support

Re: Analysis Services: Negative values are not supported

Hi @RemiAnthonise 

It's weird. You didn't change anything but it works fine now.  Still glad that you can upload and refresh the report. If you encounter that error again, feel free to post here.

 

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.

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.
Highlighted
Helper II
Helper II

Re: Analysis Services: Negative values are not supported

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 😞

Helpful resources

Announcements
June 2020 Community Highlights

June 2020 Community Highlights

Featured community members, changes to the Community, and more! Read up on recent Power BI community news.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors