Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I have a custom date dimension table and it is used to calculate a cumulative headcount from my FactHeadcount table. When I join columns of data type “date”, I get the results I expect. When I join columns on a key “DateKey” of type integer, the Headcount measure breaks.
Other details:
If Power BI joins are inner joins, why is it that it becomes a left outer join if the join is on a data type “date”? Is this expected behavior? Will it stay this way?
Is it possible to modify the measure to obtain the correct headcount, with the report filter, and using the “integer” inner join?
If you have advice and/or documentation on this, it would be greatly appreciated.
Solved! Go to Solution.
Thank you @greggyb for your explanation in the "How to mark date table" post. I understand now that the Excel Power Pivot functionality is not available in Power BI yet and it explains the behavior I experienced.
Thank you @greggyb for your explanation in the "How to mark date table" post. I understand now that the Excel Power Pivot functionality is not available in Power BI yet and it explains the behavior I experienced.
Hi @imnikki,
What is the result when you use the following formula to create Headcount measure? Does it change when you use different columns to create relationship between tables?
Headcount =
CALCULATE (
SUM (FactHeadcount[Counter]),
FILTER (
ALL (DimDateFY[DateKey]),
(DimDateFY[DateKey]) <= MAX (DimDateFY[DateKey])
)
)
Thanks,
Lydia Zhang
Hi Lydia @Anonymous,
I realize that it is best practice to have joins on integer data type and not date. However, the DAX command “ALL” in the headcount formula doesn’t count all records from the table but rather those returned by the “Report level filters”. See second chart.
If the join between the fact table and the dimension table is over a “date” data type, the “ALL” command works as desired. See first chart.
Because I want to use an integer key, I decided to create a cumulative total in SQL Server instead and use the “OVER” clause (SQL Server 2012 or newer). I won’t need DAX for the headcount measure.
BTW, I tried to e-mail you my file but I was unsuccessful. The mailbox is full.
Nicole
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 79 | |
| 38 | |
| 31 | |
| 27 | |
| 27 |