Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Kwandike
New Member

Power Query to Power BI migration syntax issues

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

3 REPLIES 3
Kwandike
New Member

Any1 pls?

Anonymous
Not applicable

@Kwandike,

When you click "Show errors" after Token comma expected, which syntax Power BI Desktop leads you to?

Regards,
Lydia

Hi @Anonymous,

It starts at G."name" (it's highlighted blue on the print screen)

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.