Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I'm facing an issue with the creation of a calculated table. I have two tables: a DimDate table and a table "DimWerknemer" containing employees including the dates they started and left the company.
The goal is to create a calculated table showing all employees that were active in the selected period of the DimDate table.
The DAX code below is giving a table containing all employees, it seems to be ignoring the applied filters on DimDate[Dag].
ActiveUsers =
VAR MinDate =
CALCULATE(MIN('DimDate'[Dag]),KEEPFILTERS(DimDate))
VAR MaxDate =
CALCULATE(MAX('DimDate'[Dag]),KEEPFILTERS(DimDate))
RETURN
CALCULATETABLE('DimWerknemer','DimWerknemer'[InDienstVanaf]<=MaxDate,'DimWerknemer'[InDienstTot]>=MinDate)
Any help would be appreciated.
I have a similar concept table in one of my reports.
AMMENDED as I meant FILTER NOT SUMMARIZE
ActiveUsers =
VAR MinDate =
CALCULATE(MIN('DimDate'[Dag]),KEEPFILTERS(DimDate))
VAR MaxDate =
CALCULATE(MAX('DimDate'[Dag]),KEEPFILTERS(DimDate))
RETURN
FILTER('DimWerknemer','DimWerknemer'[InDienstVanaf]<=MaxDate,'DimWerknemer'[InDienstTot]>=MinDate)
Hi,
calculated tables are calculated during refresh. There is no filter context during refresh, so your MinDate and MaxDate will always give the min and max date of the whole date table.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |