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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Seantoh
Frequent Visitor

How to re-arrange a data after GET DATA from a website?

Hi All, 

 

I am a newbie for Power Bi Desktop, need someone expert to help me solve this problem.

 

Original Question link : https://community.powerbi.com/t5/Desktop/How-to-get-all-the-table-data-from-a-website/m-p/287653#M12...

 

I did solve the problem and thank v-ljerr-msft for the help. 

 

and next, if let say after I get all the data from 0000-9999, but end up I just only want to search 10 sets of numbers only. 

And I want the 10 sets numbers to show total hits and separate by month hits. like the photo below.

 

Screenshot_1.jpg

This is the sample I do in excel. 

Can I rearrange the table in query editor?

 

Thanks

 

Regards

Sean 

 

 

 

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @Seantoh,


and next, if let say after I get all the data from 0000-9999, but end up I just only want to search 10 sets of numbers only

If I understand you correctly, you should be able to directly specify the 10 sets of numbers you need in the NumberRange list like below without firstly getting all the data(which could be very slow).

let
    NumberRange = {1,2,5,8,10,20},
    Source = List.Transform(NumberRange, each try {_, GetData(_)} otherwise null),
    First = List.FirstN(Source, each _ <> null),
    Table = Table.FromRows(First, {"Number", "Column1"}),
    Expanded = Table.ExpandTableColumn(Table, "Column1", {"4D No.", "4D Prize", "Draw Id", "Date", "Day", "Type", "Gap(days)"}, {"Column1.4D No.", "Column1.4D Prize", "Column1.Draw Id", "Column1.Date", "Column1.Day", "Column1.Type", "Column1.Gap(days)"})
in
    Expanded
And I want the 10 sets numbers to show total hits and separate by month hits. like the photo below. 

Why do you need to do it in Query Editor. It could be very simple to show it on a Matrix visual on your report. Smiley Happy

 

r1.PNG

 

Regards

View solution in original post

2 REPLIES 2
v-ljerr-msft
Employee
Employee

Hi @Seantoh,


and next, if let say after I get all the data from 0000-9999, but end up I just only want to search 10 sets of numbers only

If I understand you correctly, you should be able to directly specify the 10 sets of numbers you need in the NumberRange list like below without firstly getting all the data(which could be very slow).

let
    NumberRange = {1,2,5,8,10,20},
    Source = List.Transform(NumberRange, each try {_, GetData(_)} otherwise null),
    First = List.FirstN(Source, each _ <> null),
    Table = Table.FromRows(First, {"Number", "Column1"}),
    Expanded = Table.ExpandTableColumn(Table, "Column1", {"4D No.", "4D Prize", "Draw Id", "Date", "Day", "Type", "Gap(days)"}, {"Column1.4D No.", "Column1.4D Prize", "Column1.Draw Id", "Column1.Date", "Column1.Day", "Column1.Type", "Column1.Gap(days)"})
in
    Expanded
And I want the 10 sets numbers to show total hits and separate by month hits. like the photo below. 

Why do you need to do it in Query Editor. It could be very simple to show it on a Matrix visual on your report. Smiley Happy

 

r1.PNG

 

Regards

Seantoh
Frequent Visitor

need help, please.....

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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