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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
dixon1983
Regular Visitor

Apply a Filter to Data during Import from Teradata DB

Hi,

I wonder if someone can help.

 

I have created a connection within Power BI to a database located on Teradata.

 

There are over 100M rows of data on the database of which I only want to import a certain amount.

 

The criteria for what I want to import is based on the field LOADDATE of which I only want to import the last 7 days (including today).

 

The advanced editor shows the following - is this where I need to place code to filter what is imported? If so please could someone advise what I need to enter?

 

let
    Source = Teradata.Database("xxx.yyy.COM", [HierarchicalNavigation=true]),
    IQR_ODS_V = Source{[Schema="IQR_ODS_V"]}[Data],
    IQR_ABC_DEF_ALL_F_V1 = IQR_ODS_V{[Name="IQR_ABC_DEF_ALL_F_V"]}[Data]
in
    IQR_ABC_DEF_ALL_F_V1

 

 

Many thanks for any help.

1 ACCEPTED SOLUTION
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @dixon1983,

One way, you can filter date rows using screen operation. Please click the triangle-Date filters->Between as picture1 shown, then click the last 7 day and today in the canlendar shown in picture2

picture1picture1      picture2picture2

Or you can use the query statement as follows.

 

let
    Source = Teradata.Database("xxx.yyy.COM", [HierarchicalNavigation=true]),
    IQR_ODS_V = Source{[Schema="IQR_ODS_V"]}[Data],
    IQR_ABC_DEF_ALL_F_V1 = IQR_ODS_V{[Name="IQR_ABC_DEF_ALL_F_V"]}[Data]
   #"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Date] >= #date(2018, 2, 14) and [Date] <= #date(2018, 2, 21))
in
    #"Filtered Rows"


Best Regards,
Angelia

View solution in original post

1 REPLY 1
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @dixon1983,

One way, you can filter date rows using screen operation. Please click the triangle-Date filters->Between as picture1 shown, then click the last 7 day and today in the canlendar shown in picture2

picture1picture1      picture2picture2

Or you can use the query statement as follows.

 

let
    Source = Teradata.Database("xxx.yyy.COM", [HierarchicalNavigation=true]),
    IQR_ODS_V = Source{[Schema="IQR_ODS_V"]}[Data],
    IQR_ABC_DEF_ALL_F_V1 = IQR_ODS_V{[Name="IQR_ABC_DEF_ALL_F_V"]}[Data]
   #"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Date] >= #date(2018, 2, 14) and [Date] <= #date(2018, 2, 21))
in
    #"Filtered Rows"


Best Regards,
Angelia

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.