Python Forum
How to filter in a Pivottable Excel - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: How to filter in a Pivottable Excel (/thread-33304.html)



How to filter in a Pivottable Excel - Bob333 - Apr-14-2021

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]")