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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ChrisW3
Frequent Visitor

Filtering Based on Measure Values in Excel Pivot Table

I'm trying to analyze some data from a data model in Excel (uisng Analyze in Excel, or just same data model in Power Pivot, I;ve tried both)

I'm looking for advice on how to do what I'm trying to do in a more efficient way. I have a data model with data mainly from power query sources pulling from CSV files. The main fact table has a little over 1 million rows, with several other dimension tables and I have several calculated measures. The data is related to payroll, and I am doing an analysis looking for individual employees who are over certain thresholds in a couple different measures. Example, percent of a certain type of pay is >=20% AND dollars of same type of pay are over $5,000. Once I have that set identified, I'd like to be able to slice and dice by different dimensions like division, department, full time/part time, job type, etc. So current approach is adding most of these dimensions as row items in pivot table created from my data model, and some as filters, then applying value filters at the employee ID level in the row items. In order to get BOTH criteria, I just created a duplicate of the employee ID column in the data model table, and then added both to row items and applied one value filter to each (since as far as I know there is no way to apply more than 1 value filter like that to the same row item in a pivot table). However, this seems to make the pivot table very slow to update when any change is made, mainly when the 2 employee ID fields move farther down in the list of row items in the pivot table. Example, maybe I start with those first in the list, then move Division and Job type to the top to see employee counts by division and job, suddenly any change I make to the pivot becomes incredibly slow stuck and hangs at "reading data". I have had it take an hour or more when I have actually been willing to wait it out.

Is there something in this scenario I could be doing in a different way that would be more efficient? I could accomplish the same thing much faster just creating several different pivot summaries and then doing some vlookups and other manual spreadsheet manipulation (there are only about 12 to 15 thousand unique employee records, which is where the filtering needs to be applied), so I feel like I must be doing something wrong. I want to make this more easily repeatable via refreshing my data model without the manual spreadsheet work.

Some things I have tried:
I originally had a lot more measures showing in my pivot, so I have narrowed those down to just the few main ones I am analyzing right now
I have gone through where possible removing the FILTER() function from my measures as I have read that it can be quite inefficient
I significantly reduced the size of my fact table to just one year of data where before I had 4

1 REPLY 1
Stachu
Community Champion
Community Champion

it seems to me that right now your model is a single table, correct? If that's the case then the performance would be much better if you implemented star schema instead, see here:

https://docs.microsoft.com/en-us/power-bi/guidance/star-schema



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors