2 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Dynamic MoM/WoW KPI matrix with mixed data types on rows (Power Query / Pivot Table)

Our take

Managing a dynamic Month-over-Month (MoM) and Week-over-Week (WoW) KPI matrix in Excel can be challenging, especially when dealing with mixed data types. Currently, a Python script extracts KPI data via Trino SQL, which is then manually imported into Excel through Power Query. The goal is to automate this workflow, allowing new date columns to auto-populate upon refreshing the Pivot Table without losing formatting for various data types. Overcoming this hurdle will streamline reporting and enhance productivity in the absence of a dedicated BI tool.

I’m trying to automate a dashboarding workflow and have hit a wall with dynamically expanding date columns and mixed formatting. Because we don't currently have access to a dedicated BI tool, all our reporting has to be handled in Excel.

https://preview.redd.it/f22lekt4o8qg1.png?width=651&format=png&auto=webp&s=c98a6f877458f15ea3e0c0a374a8d3fbe2459be9

Current Setup:

  • I have a Python script that executes Trino SQL queries for these KPIs and dumps the output into .csv files.
  • I manually import these .csv files into Excel using Power Query and then refresh Pivot Tables built on top of that data.

The Goal: I want to create a matrix showing 10 different KPIs on the rows and time periods (MoM / WoW) on the columns (see screenshot). As new data is written to the .csvs, I want the columns in this view to auto-populate and expand upon simply hitting refresh.

The Blocker: Because the KPIs have mixed data types (Percentages, Currency/₹, and Whole Numbers), I'm struggling to set this up cleanly in a Pivot Table without losing the specific number formatting for each row.

I want to avoid complex, volatile array formulas (OFFSET, INDIRECT, etc.) that require manual updates or break easily. I just want to drop the new CSV, refresh, and have the new date columns appear with the correct formats per KPI.

Currently, I load the csv's into PowerQuery, on which I have made Pivots

(Note: I used AI to help structure and rephrase this problem statement for clarity.)

submitted by /u/godof23
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article

Related Articles