Python Forum

Full Version: How to filter in a Pivottable Excel
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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]")