Join 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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 135 | |
| 102 | |
| 67 | |
| 65 | |
| 56 |