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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

variable value from list

Hi,

 

I have the situation that everday there is a new database on a SQL Server with the name of the date. 

Example 180501 (1 May 2018) or 180430 (30 April 2018)

 

Now I want to join one table from theses databases from the last 10 days into a new table in PowerBI

 

I thougt to make 10 variables and a appendquery to join these tables.

But how do i make:

Paramater1 = first record (180501)

Paramater2 = second record (180430)

Paramater3 = third record (180429)

etc etc

 

with kind regards

2 REPLIES 2
Anonymous
Not applicable

Unfortunately this is not what I mean

 

Example:

On April 15th I have the next 5 last databases with the name of the date

  1. 2018-04-15
  2. 2018-04-14
  3. 2018-04-13
  4. 2018-04-12
  5. 2018-04-11

On April 18th I have the next 5 last databases:

  1. 2018-04-18
  2. 2018-04-17
  3. 2018-04-16
  4. 2018-04-15
  5. 2018-04-14

I have in PowerBI the list with the last 5 databases.

How can i make a function or query that automatic join the last 5 databases together at which the list changes almost every day ?

 

With kind regards,

 

 

v-yuta-msft
Community Support
Community Support

Hi Norbertus,

 

Based on your description, you need parameter list to save all the datasource names in it, right? 

If my understanding is right, query Parameter can meet your requirement. For more details about query parameter, please refer to:

http://biinsight.com/power-bi-desktop-query-parameters-part-1/.

https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/.

 

Regards,

Jimmy Tao

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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