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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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