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
Dear community,
I have many rows with start and finish dates. I want to project expenses(cost+salary) for future months. For instance, we are in november and I want to project expenses for december. The question is that I don't want to include any employee that its end date is less than 31/12/2024, becuse this date means that the employee not finish its relationship with the company.
I tried to create this measure, but the result is blank.
How can I do this?
Thanks to everybody.
José Luis
Solved! Go to Solution.
Hi @jlarques ,
To project expenses for a future month (e.g., December 2024) while excluding employees whose END DATE is earlier than 31/12/2024, you can modify your DAX measure as follows:
ProjectedExpenses =
VAR _FechaFin = DATEVALUE("31/12/" & YEAR(TODAY()))
VAR Result =
CALCULATE(
SUM(factPuestos[Cost]) + SUM(factPuestos[Salary]),
FILTER(
factPuestos,
factPuestos[END DATE] >= _FechaFin
)
)
RETURN
Result_FechaFin Calculation:
FILTER Logic:
Summation:
SUM vs. VALUES:
Let me know if you face further issues!
Please accept this as solution if it helps. Appreciate Kudos.
Thank you so much @FarhanJeelani !
your explanation contains important details to understand what was the problem. Now it works and I have my specific calculation for each employee.
Thanks again!
Hi @jlarques ,
To project expenses for a future month (e.g., December 2024) while excluding employees whose END DATE is earlier than 31/12/2024, you can modify your DAX measure as follows:
ProjectedExpenses =
VAR _FechaFin = DATEVALUE("31/12/" & YEAR(TODAY()))
VAR Result =
CALCULATE(
SUM(factPuestos[Cost]) + SUM(factPuestos[Salary]),
FILTER(
factPuestos,
factPuestos[END DATE] >= _FechaFin
)
)
RETURN
Result_FechaFin Calculation:
FILTER Logic:
Summation:
SUM vs. VALUES:
Let me know if you face further issues!
Please accept this as solution if it helps. Appreciate Kudos.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 36 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 74 | |
| 66 | |
| 65 |