Python Forum
How to filter in a Pivottable Excel
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to filter in a Pivottable Excel
#1
Hello,

In the past i have writen some code in VBA for excel and one of the thing the code did was filtering a date in a Pivot table.
The Pivot table gets his data from PowerBI.

Now i want to use Python to do the same, but i can't find the right information.
Is there anyone who knows how to doe the same in Python as the next line of code in VBA?

ActiveSheet.PivotTables("Drtbl_Hand_korting").PivotFields( _
"[DimDate].[Date].[Date]").VisibleItemsList = Array( _
"[DimDate].[Date].&[2021-02-02T00:00:00]")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PivotTable help needed please jdekock 1 475 Jun-29-2023, 02:55 PM
Last Post: Larz60+
  Filter Excel and Convert an Excel File giddyhead 0 2,195 May-13-2021, 06:31 PM
Last Post: giddyhead
  Excel Filter and copy data by python ls_01 0 2,836 Mar-19-2018, 03:17 PM
Last Post: ls_01

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020