Date query in Powerquery

ErsinALACA

New Member
Joined
Mar 6, 2020
Messages
31
Office Version
  1. 2019
Platform
  1. Windows
Sorry my english is not enough. I will explain it simply;

TableA;
TableA.PNG


TableB (Wanted)
TableB.PNG


Thanks for answers.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
The date I will write in Table_B; It will be searched as a date range in Table_A and its equivalent will be returned. So it's not exactly a match as you mentioned.
 
Upvote 0
Google çeviriyle çevirdim ► Yardımınız için öncelikle teşekkür ederim. Table_A kaynak veri; Table_B ise hedef sorgu diyelim. Table_B'de yazdığım tarih; Table_A 'da aralık olarak aranacak.
 
Upvote 0
I translated it with Google translation ► First of all thank you for your help. Table_A source data; Let's say the target query is Table_B. The date I wrote in Table_B; It will be searched as a range in Table_A.
 
Upvote 0
is that what you want? (are you aware that this is a PowerBI forum?)
=INDEX(TableA[Part],MATCH([Date],TableA[Date],1))
where match_type can be: 1, 0 or -1
DatePartPriceDatePartPrice
13.03.2019Part A518.03.2019Part B6.3
13.03.2020Part B6
14.03.2021Part A5.2
14.03.2022Part B6.2
18.03.2023Part A5.3
18.03.2024Part B6.3


istediğin bu mu? (bunun bir PowerBI forumu olduğunu biliyor musunuz?)
=INDEX(TableA[Part],MATCH([Date],TableA[Date],1))
burada match_type şunlar olabilir: 1, 0 veya -1
 
Upvote 0
ups, wrong tables in previous post, sorry
(önceki yazıda yanlış tablolar, üzgünüm)
DatePartPriceDateDatePartPrice
13.03.2019Part A514.03.201914.03.2019Part A5.2
13.03.2019Part B614.03.2019Part B6.2
14.03.2019Part A5.2
14.03.2019Part B6.2
18.03.2019Part A5.3
18.03.2019Part B6.3

Code:
// TableB
let
    Source = Excel.CurrentWorkbook(){[Name="TableB"]}[Content]
in
    Source

// TableA
let
    Source = Excel.CurrentWorkbook(){[Name="TableA"]}[Content]
in
    Source

// Merge1
let
    Source = Table.NestedJoin(TableB,{"Date"},TableA,{"Date"},"TableA",JoinKind.LeftOuter),
    #"Expanded TableA" = Table.ExpandTableColumn(Source, "TableA", {"Part", "Price"}, {"Part", "Price"})
in
    #"Expanded TableA"
 
Upvote 0
The event I'm talking about is related to Excel Power Query. I don't want formulas in Excel. I guess Table statement was wrong, so you were wrong. Let Sql_A be Sql_B queries.
 
Upvote 0
I'm about to leave the workplace. I will try the codes you sent. Thank you very much for your interest and help. I will report the result.
 
Upvote 0

Forum statistics

Threads
1,215,438
Messages
6,124,873
Members
449,192
Latest member
MoonDancer

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top