Nullable text?

Tigerexcel

Active Member
Joined
Mar 6, 2020
Messages
493
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Book3
AB
1PositionRep
2HRJack
3SalesFred
4FinanceJack
5AdminPete
6MgtJack
7TrainingFred
8SecurityFred
9ITJack
Sheet1


let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Position", type text}, {"Rep", type text}}),
#"Grouped Rows" = #!"Table.Group(#""Changed Type"", {""Rep""}, {{""Count"", each [Rep], type list [Position=nullable text, Rep=nullable text]}})"
in
#"Grouped Rows"

Using PQ to return grouped by records, as in Jack HR, Finance, Mgt, IT
I get a Token comma expected message, I've tried inserting commas in various places but to no avail. When I remove the "[Position=nullable text, Rep=nullable text]" the command works and returns the grouped records.
What does the nullable text information come up as I haven't noticed it before? Where is the token comma supposed to go to make this work if I leave the nullable text info in?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
do you know how to use code tags?
tags1.png
 
Upvote 0
How is this?

Power Query:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Position", type text}, {"Rep", type text}}),
#"Grouped Rows" = #!"Table.Group(#""Changed Type"", {""Rep""}, {{""Count"", each [Rep], type list [Position=nullable text, Rep=nullable text]}})"
in
#"Grouped Rows"
 
Upvote 0
originally code from Advanced editor looks like
Power Query:
let
   Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
   #"Changed Type" = Table.TransformColumnTypes(Source,{{"Position", type text}, {"Rep", type text}}),
   #"Grouped Rows" = #!"Table.Group(#""Changed Type"", {""Rep""}, {{""Count"", each [Rep], type list [Position=nullable text, Rep=nullable text]}})"
in
   #"Grouped Rows"
 
Upvote 0
originally code from Advanced editor looks like
Power Query:
let
   Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
   #"Changed Type" = Table.TransformColumnTypes(Source,{{"Position", type text}, {"Rep", type text}}),
   #"Grouped Rows" = #!"Table.Group(#""Changed Type"", {""Rep""}, {{""Count"", each [Rep], type list [Position=nullable text, Rep=nullable text]}})"
in
   #"Grouped Rows"
Yes, that's the same. I modified the M code to change from Table to List.
 
Upvote 0
there is a TAB before code line (step) as you can see and long lines are not wrapped in code tags
ok, now you know how to use code tags :)
 
Upvote 0
Hi again Sandy et al, do I need to provide any more information to be able to solve this problem?
 
Upvote 0
Hi again Sandy et al, do I need to provide any more information to be able to solve this problem?
I know you are playing with the code but I don't understand what you want to achieve.
Any detailed description is welcome.
 
Upvote 0

Forum statistics

Threads
1,225,653
Messages
6,186,205
Members
453,340
Latest member
yearego021

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top