Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I have a table which includes 4 different Versions for a budget headcount file, Client Account (A&B), Month Start Date and Headcount numbers (see table below)
Version | ClientAccount | MonthStartDate | Headcount |
FY25 Budget | Client A | 1/1/2025 | 100 |
FY25 Budget | Client A | 2/1/2025 | 110 |
FY25 Budget | Client A | 3/1/2025 | 120 |
April Snapshot | Client A | 1/1/2025 | 110 |
April Snapshot | Client A | 2/1/2025 | 120 |
April Snapshot | Client A | 3/1/2025 | 130 |
May Snapshot | Client A | 1/1/2025 | 120 |
May Snapshot | Client A | 2/1/2025 | 130 |
May Snapshot | Client A | 3/1/2025 | 140 |
Current | Client A | 1/1/2025 | 130 |
Current | Client A | 2/1/2025 | 140 |
Current | Client A | 3/1/2025 | 150 |
FY25 Budget | Client B | 1/1/2025 | 200 |
FY25 Budget | Client B | 2/1/2025 | 220 |
FY25 Budget | Client B | 3/1/2025 | 240 |
April Snapshot | Client B | 1/1/2025 | 220 |
April Snapshot | Client B | 2/1/2025 | 240 |
April Snapshot | Client B | 3/1/2025 | 260 |
May Snapshot | Client B | 1/1/2025 | 240 |
May Snapshot | Client B | 2/1/2025 | 260 |
May Snapshot | Client B | 3/1/2025 | 280 |
Current | Client B | 1/1/2025 | 260 |
Current | Client B | 2/1/2025 | 280 |
Current | Client B | 3/1/2025 | 300 |
The above table is connected to a Calender table linked on Month Start Date and I have 2 parameter field tables for measures which will allow users to select the measures from 2 sets of slicers they would like to see included in a matrix visual. The 2 parameter fields have been added to the Values section in the field well for the matrix visual. Below are the 2 parameter tables I have setup.
I'm looking for some guidance for a way to show a field in the matrix which will calculate the difference between the values for the 2 measure field parameters that are being displayed in the matrix. The Diff column in the below screenshot illustrates the desired result I'm looking to acheive when '25 Buget' is selected in the 1st slicer and 'Current' is selected in the 2nd slicer.
Feb-25 | Jan-25 | Mar-25 | |||||||
ClientAccount | 25 Budget | Current | Diff | 25 Budget | Current | Diff | 25 Budget | Current | Diff |
Client A | 110 | 140 | 30 | 100 | 130 | 30 | 120 | 150 | 30 |
Client B | 220 | 280 | 60 | 200 | 260 | 60 | 240 | 300 | 60 |
Total | 330 | 420 | 90 | 300 | 390 | 90 | 360 | 450 | 90 |
Or for example if '25 Buget' is selected in the 1st slicer and '25 May' is selected in the 2nd slicer the Diff column in the below screenshot illustrates the desired result I'm looking to acheive.
Feb-25 | Jan-25 | Mar-25 | |||||||
ClientAccount | 25 Budget | 25 May | Diff | 25 Budget | 25 May | Diff | 25 Budget | 25 May | Diff |
Client A | 110 | 130 | 20 | 100 | 120 | 20 | 120 | 140 | 20 |
Client B | 220 | 260 | 40 | 200 | 240 | 40 | 240 | 280 | 40 |
Total | 330 | 390 | 60 | 300 | 360 | 60 | 360 | 420 | 60 |
Solved! Go to Solution.
Thankyou, @DataNinja777, for your response.
Hi scowans,
We appreciate your inquiry submitted through the Microsoft Fabric Community Forum.
Based on my understanding of your query, please find attached a screenshot and a sample PBIX file that may help resolve the issue:
If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members facing similar queries.
Should you have any further questions, please feel free to contact the Microsoft Fabric Community.
Thank you.
Thankyou, @DataNinja777, for your response.
Hi scowans,
We appreciate your inquiry submitted through the Microsoft Fabric Community Forum.
Based on my understanding of your query, please find attached a screenshot and a sample PBIX file that may help resolve the issue:
If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members facing similar queries.
Should you have any further questions, please feel free to contact the Microsoft Fabric Community.
Thank you.
Hi @scowans ,
Thank you for sharing the detailed question. While the current approach using pre-aggregated values and measure parameters may seem like a quick workaround—and is indeed commonly seen in many organizations 💦, including mine 😭—it doesn’t fully leverage the flexibility and scalability that DAX offers.
Headcount is typically best managed using an employee-level fact table with joining and leaving dates, combined with a disconnected calendar table. You can even handle budgeted and forecast headcount by including planned (dummy) rows with expected start and end dates. This structure allows for more accurate, dynamic reporting across versions, including hires, terminations, and backdated adjustments.
That said, if granular employee-level data isn’t currently available, I’d recommend treating this setup as a temporary workaround rather than a long-term solution. While it’s technically possible to calculate differences between selected parameter values, this approach tends to be fragile, harder to maintain, and limits deeper analysis. Investing in a proper data model will pay off significantly over time.
I’m sharing a link to my blog post on this topic below—hoping that one day this kind of model becomes the standard for headcount analysis:
🔗 Dynamic Headcount Analysis using Dax
Best regards,
Hi @DataNinja777 ,
Thanks so much for your feedback here. This is helpful. My actual data model includes many more dimensions in the fact table including employee level detail to comprise the headcount numbers. The data model info being referenced here is a simplified model using some sample data for just a few of the key dimensions to help illustrate the delima I'm trying to solve for to explore some of the possibilities and suggested approaches to calculate differences between selected parameter values as I'm new to using parameter fields and I'm trying to better understand the art of the possible. Would it be possible to provide a suggested solution for the Diff calculation I'm trying to acheive?
User | Count |
---|---|
84 | |
76 | |
74 | |
49 | |
39 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |