Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

DAX simultaneous query issue - Part Human/Part Bug?

$
0
0

Hi all,

I have a web application that sends multiple DAX queries to the server in an asynchronous manner.  I was finding that occasionally (maybe 40% of the time) I was getting bad results   (for example data destined for a pie chart that consisted of just two values would return values 1000,500 most times (correct) and 1000,-1000 when it felt moody)

This would only happen when two pie charts co-existed with similar queries(based on the same measures) were fired at pretty much the same time.

The test app

To cut out all the complexity I wrote a simple Window application that took a single DAX query and fired it X times in quick succession, monitoring the result, if the result differed from the previous call it recorded an error.

If I run one instance of that program it runs through 2000 calls without issue, if I run a second instance at the same time they clash - a lot.

I am very new to SSAS, and DAX so I am sure I have some misconceptions .. but I believe I should get either correct results, errors or incorrect results -but the same every time, not dependant on the amount of calls to a given measure.

This seems to happen when :

  • The queries involve the same measure
  • That measure uses "Calculate"

So to distil the problem down here is the basic measure:

WeirdMeasure:=calculate('Task'[TotalHoursTask],'Task'[TaskTypeId]>0  )

TotalHoursTask is another measure:

TotalHoursTask:=SUM([SecondsTask])/3600

The DAX query being repeatedly sent is :

evaluate
(

 row
 (
  "Test",Calculate('Task'[WeirdMeasure])
 
 )
)

In this case the query returns a good value back or nothing, but the real life measure was a measure that relied on two other measures, and it was a sub measure that returned nothing (as opposed to the whole query).

In both the live scenario and this test I am using adomdDataAdapter to communicate with the tabular SSAS server:

AdomdDataAdaptercurrentDataAdapter =newAdomdDataAdapter(qry, cnx);

DataTabletabularResults =newDataTable();

currentDataAdapter.Fill(tabularResults);

returntabularResults;

In the case of the test app, I simply render the table to XML, for live it ends up as JSON data.

Any help, guidance much appreciated.

Thanks

P


Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>