Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Hello, can you help? Power BI looping

Hello, 

We are wondering how to we can change the parameters within a URL to different days, months, and years. 

For example, analyzing the history of the Top 40 Charts: 

http://top40-charts.com/chart.php?cid=27&date=2019-04-20 .

For example, this is April 20, 2019. How can we automatically compile a loop of a long time period instead of having to do it manually?

 

Thank you!

  • Anonymous's avatar
    Anonymous
    7 years ago

    This might work. It will create a URL for each date in for a set period of time. 

     

    1. Create a new table 
      Date = 
          ADDCOLUMNS(
              CALENDAR("1/1/1980", TODAY()),
                   "Formatted", FORMAT([Date], "YYYY-MM-DD")
                  )
    2. Create a column concating your URL and the formatted date 
      Column 2 = CONCATENATE("http//Top40-chart.com/chart.php?cid=27&date=", 'Date'[Formatted])
    3.  Format the data category to a URL

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    This might work. It will create a URL for each date in for a set period of time. 

     

    1. Create a new table 
      Date = 
          ADDCOLUMNS(
              CALENDAR("1/1/1980", TODAY()),
                   "Formatted", FORMAT([Date], "YYYY-MM-DD")
                  )
    2. Create a column concating your URL and the formatted date 
      Column 2 = CONCATENATE("http//Top40-chart.com/chart.php?cid=27&date=", 'Date'[Formatted])
    3.  Format the data category to a URL