cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jbhatti
Regular Visitor

SQL query with outer applys

Hi

 

Is there a way to convert this query for the service? It works well on the Desktop version but not in the service

 

declare @From date
declare @to date
SELECT t1.*,t2.*,t3.*
FROM Fact f

Cross apply
(
select top 1
from dimension1 d1
where f.id=d1.id
and datefrom >=@From  and dateto <=@To
order by datefrom desc) t1

outer apply

(select top 1
from dimension2 d2
where f.id2=d2.id
and datefrom >=@From  and dateto <=@To
order by datefrom desc) t2

outer apply

(select top 1
from dimension2 d2
where f.id3=d2.id
and datefrom >=@From  and dateto <=@To
order by datefrom desc) t3

3 REPLIES 3
daxer-almighty
Solution Sage
Solution Sage

@jbhatti 

 

And you are posting such a question in a forum that is on "DAX Commands and Tips"?

@daxer-almighty to answer te obvious yes. This can't be done through the GUI, it's a DAX only, if possible in Power BI.

And it doesn't give you to think that nobody has even tried to answer your question for such a long time? I'd kindly suggest you read this before posting any kind of question on forums (not only this one).

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors