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 moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. 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.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 31 | |
| 23 | |
| 15 |
| User | Count |
|---|---|
| 74 | |
| 58 | |
| 31 | |
| 31 | |
| 23 |