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

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.

Reply
RemiAnthonise
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.

7 REPLIES 7
Anonymous
Not 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 😞

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!

Anonymous
Not applicable

Glad it helped

v-xuding-msft
Community Support
Community 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.

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.

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.

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.

 

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors