Forum Discussion

SebastianMaenz's avatar
SebastianMaenz
Frequent Visitor
6 years ago

Measure Issue: works flawless using import query but fails using direct query???

Hi,

 

this measure gives me the correct result when used in desktop version (via import query AND direct query) but works only in the online service when using import query. The result is [NULL] using direct query online which is wrong. What is different with the direct query in the online service?? 

 

ToDo_2110 (heute)* =
CALCULATE(SUM('LAB-R*'[DD_today]); FILTER('LAB-R*'; 'LAB-R*'[analyticalUnitCode] = "2120" && ROUND(CALCULATE(MAX('LAB-R*'[createdOn]); FILTER('LAB-R*'; 'LAB-R*'[analyticalUnitCode] = "2120"));5) = ROUND('LAB-R*'[createdOn];5)))
 
Thanks a lot for any explanations here or different code I could try out.
Sebastian

5 Replies

    • SebastianMaenz's avatar
      SebastianMaenz
      Frequent Visitor

      Hi Icey,

       

      the gateway seems to be configured correctly to me. It is possible to get a result for e.g. the measure below (part of the one i would like to use):

       

      Measure = (CALCULATE(ROUND(MAX('LAB-R*'[createdOn]);5); 'LAB-R*'[analyticalUnitCode] ="2120"))
       
      Lab-R* [created on] is of type Date/Time. The result of the measure above is 43793.95913000 (or 25.11.19 09:23:06). I have to use the round function as one dataset of interest to me is written to the database with slight differences in the miliseconds range.  
       
      Best regards
      Sebastian
      • Icey's avatar
        Icey
        Icon for Community Support rankCommunity Support

        Hi SebastianMaenz ,

        Please download your PBIX file from Power BI Service and open with Power BI Desktop. Check if there is any difference. Maybe your data has been refreshed and the result is just NULL.

         

        Best Regards,

        Icey

         

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.