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 everyone,
I have a Fact_Table with two date columns: "project start date" and "project end date".
I need to create 3 different count measures that dinamically change based on selected year in a slicer.
Theese counts must respect the following rules:
Right now, the relationship between F_Projects and Calendar is setted on F_Projects[project start date] N->1 Calendar[Date].
I don't know if this could generate errors in this type of counting..
I also need to create a measure or a calculated column that dynamically filters some report pages, having this rule:
Can Anyone help me solve this issue????
Thank you in advance.
Luca
Hi @L_G ,
I made some changes to your three measures.
Completed Projects in the selected year =
CALCULATE(
COUNT(F_Projects[Id_projects]),
YEAR(F_Projects[project end date]) = SELECTEDVALUE(Calendar[Year])
)
Ongoing Projects in the selected year =
CALCULATE(
COUNT(F_Projects[Id_projects]),
YEAR(F_Projects[project start date]) < SELECTEDVALUE(Calendar[Year]),
YEAR(F_Projects[project end date]) > SELECTEDVALUE(Calendar[Year])
)
Projects Started in the selected year =
CALCULATE(
COUNT(F_Projects[Id_projects]),
YEAR(F_Projects[project start date]) = SELECTEDVALUE(Calendar[Year]),
YEAR(F_Projects[project end date]) > SELECTEDVALUE(Calendar[Year])
)
It should now count correctly.
I would be grateful if you could provide me with sample data for testing, please remove any sensitive data in advance.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |