Quantcast
Channel: Power Query topics
Viewing all articles
Browse latest Browse all 31052

Power Query to Power BI migration syntax issues

$
0
0

Hey!

I have this code wich works totally fine in Power Query but brags in Power BI.

 

I mean it works with some simple code like SELECT name FROM groups.name, but it fails when using some more difficult forms like G."name" "groups.name" etc.

 

Instead it throws an error "Token comma expected" (see screen capture below).

 

I do assume that there's some syntax hints but I wasn't able to QA them with try'n'fail strategy.


Appreciate your help and efforts.

 

let
	  Source = PostgreSQL.Database("server-hidden-for-a-reason", "server-hidden", 
	    [Query="SELECT
        G."name" "groups.name",
	T."fullName" "teachers.fullName",
        LR."createdAt"::date "lessonrecords.createdAt.date",
	LR."createdAt"::time "lessonrecords.createdAt.time",
	LR.private "lessonrecords.private",
	LC."name" "lessoncards.name",
	LC."category" "lessoncards.category",
	LR.status "lessonrecords.status",
        LR.id "lessonrecords.id",
        LR."groupId" "lessonrecords.groupId",
        LR."authorId" "lessonrecords.authorId",
        LR."lessonId" "lessonrecords.lessonId",
	length(LR.note) "length_of_a_note",
	(SELECT COUNT(*) FROM public.lessonrecordphotos WHERE "lessonrecordId" = LR.id) "N_of _Photos_In_A_Record",
	(SELECT COUNT(*) FROM public.lessonrecordparticipants WHERE "lessonrecordId" = LR.id) "N_of_Participants_In_A_Record"
FROM public.lessonrecords LR
  INNER JOIN public.teachers T ON (LR."authorId" = T.id)
  LEFT JOIN public.lessoncards LC ON (LR."lessonId" = LC.id)
  INNER JOIN public.groups G ON (LR."groupId" = G.id);"])
in
	  Source

PowerBIQuery.png


Viewing all articles
Browse latest Browse all 31052

Trending Articles



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