This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi,
I have reviewed other solutions but none seem to do what i want it to do. I have a list of agents in a DimParty Table which has a start date column and an expected end date column. I have a DimDate table where the active relationship is between the start date of DimParty. I want to be able to plot a graph with shows on a gievn day what the count of agents, and obviously stop counting the rows after the end date. I'm not sure if the issue is with the none active relations with the end date. Here are some solutions i have tried;
Try adding in an ALL and I recommend modifying your FILTER too. Replace Date with Dates and Agents with DimParty.
AgentCount =
SUMX(
'Date',
CALCULATE(
COUNT( Agents[AgentID] ),
ALL( Agents ),
FILTER(
ALL( Agents[StartDate], Agents[EndDate] ),
Agents[StartDate] <= 'Date'[Date]
&& Agents[EndDate] >= 'Date'[Date]
)
)
)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Thanks Pat, I've managed to pick apart on your help and get to where i need to be 🙂
Just to note, I didnt help the situation by not referring to agent table as DimParty, so i have amended the text above (to clarify, there is no DimAgent table, its DimParty which holds the agent details, i just tripped over myself)
@LouisSh , is Agent a SCD ?
refer
https://www.zartis.com/scd-implementation-with-temporal-tables-in-power-bi/
from guyinacube
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 31 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 66 | |
| 56 | |
| 31 | |
| 26 | |
| 23 |