Forum Discussion
Syntax for TOPN on Source Statement of Power Query
- 10 months ago
hello ishade
i am not sure but seems the last step is not correct.
the M code should put the previous step
you previous step is Navigation (sorry i dont write it in japanese)
or else, you can use the ribbon button so you dont have to type the code manually (the selection from ribbon should automatically detect the previous step).
Thank you.
hello ishade
TOPN is a DAX.
While in your screenshot, it looks like PQ so you need M instead of DAX.
in PQ, you can create an index then filter row above certain value of that index.
Hope this will help.
Thank you.
Hi, Irwan
Thanks for your kind reply. I tried to insert step on my Power Query as following;
but got error of 'Token Litheral expected'.
The steps in screenshot are 1. source, 2. navigation, 3. custom (at which I applied "= Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type)").
I guess main cause of this would be no table at step 2, navigation (on which timeout error happend after 10 minutes.)
- Irwan10 months agoSuper User
- ishade10 months agoRegular Visitor
Hi Irwan
Thanks for your kind correction. But I am sorry to report you that it still shows some syntax error as following ;
- Irwan10 months agoSuper User
hello ishade
i am not sure but seems the last step is not correct.
the M code should put the previous step
you previous step is Navigation (sorry i dont write it in japanese)
or else, you can use the ribbon button so you dont have to type the code manually (the selection from ribbon should automatically detect the previous step).
Thank you.