Forum Discussion

YD-BI's avatar
YD-BI
Frequent Visitor
5 years ago

Measure gives wrong results in the Service

Hi,

 

I have a discrepancy between results produced by a measure in Desktop or in the Service (even after republishing).

Here is an example (last line is the measure and above is a 'debug measure' - first lines are fine).

First screenshot in Desktop, second in Service:

 

 

Here is the debug measure: (prints the VAR and the desired measure)

VAR X=1
VAR _jrEtd=MAX(dimJourEtude[Jour étude])
VAR _sjr=MAX(dimDateSejour[Date de Séjour])
VAR _cur=MIN(_jrEtd,_sjr+1)
RETURN
_jrEtd& " | "&_sjr&" | "&_cur&" | "&
CALCULATE(
SUMX(
DATESBETWEEN(
'Pick-ups par Segmentation'[Jour étude],
_cur -X+1,
_cur
),
CALCULATE(SUM('Pick-ups par Segmentation'[Pick-up]))
),
ALL(dimJourEtude[Jour étude])
)

 

When used in the matrix, dimJourEtude[Jour étude] is filtered on the page (=16/12/2020), hence the ALL in the measure, and dimDateSejour[Date de Séjour] is set by the column.

 

I also set another matrix to show the table 'Pick-ups par Segmentation' and see if the discrepancy came from there, but to no avail: both Desktop and Service have the correct total for 'Pick-ups par Segmentation'[Pick-up]...

 

Any idea where the issue might come from?

 
 

3 Replies

  • v-kelly-msft's avatar
    v-kelly-msft
    Icon for Community Support rankCommunity Support

    Hi YD-BI ,

     

    Are there any filters applied in Service?

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my post as a solution!

    • YD-BI's avatar
      YD-BI
      Frequent Visitor

      Hello Kelly,

       

      The only filter applied is on dimJourEtude, and it is applied in the same way in Desktop or in Service.