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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I am having some major issues with my dashboard now that we are in the beginning of 2025 for some reason. I don't know if it's a relationship issue, or a formula issue. When I use a table to drag in the Current Year Sales, I get the correct number, but the moment I add any other field such as the sales rep, my sub total is correct, but the details are absolutely not, it seems to be taking the data from the previous year actually.
The formula for the YTD Paid (#) is this
Solved! Go to Solution.
Hi @Neyney Try with the below code:
Won Oppty Current (#) =
CALCULATE(
COUNTROWS('Open and Won Opportunities Data'),
'Open and Won Opportunities Data'[Report Source] = "Won",
YEAR('Open and Won Opportunities Data'[Actual Close Date]) = YEAR(TODAY())
)
Won Oppty Current ($) =
CALCULATE(
SUM('Open and Won Opportunities Data'[Total Est. Proposal Amt]),
'Open and Won Opportunities Data'[Report Source] = "Won",
YEAR('Open and Won Opportunities Data'[Actual Close Date]) = YEAR(TODAY())
)
Hope this helps!!
If this solved your problem, please accept it as a solutiona and a kudos!!
Best Regards,
Shahariar Hafiz
Hi ,
Try using the DAX formula shafiz_p provided.
Besides, when adding any other field such as the sales rep, your sub total is correct, but the details are absolutely not, what detail information is incorrect?
Try to check that the relationship between sales rep field and another table column are correctly set up.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Neyney It looks like you're trying to compare year-to-date (YTD) sales for the current year with the same period last year that means last year up to the same date as this year. You could try datesbetween to specify the date range from the start of last year to the same date last year as the maximum date in your current dataset. Here is the revised verson, you could try:
LY YTD Sales =
CALCULATE(
[All Sales Sum],
DATESBETWEEN(
'Paid Date Table'[Date],
DATE(YEAR(MAX('Paid Date Table'[Date])) - 1, 1, 1),
DATE(
YEAR(MAX('Paid Date Table'[Date])) - 1,
MONTH(MAX('Paid Date Table'[Date])),
DAY(MAX('Paid Date Table'[Date]))
)
),
'Paid Date Table'[IsPast] = TRUE()
)
Hope this helps!!
Hi ,
Try using the DAX formula shafiz_p provided.
Besides, when adding any other field such as the sales rep, your sub total is correct, but the details are absolutely not, what detail information is incorrect?
Try to check that the relationship between sales rep field and another table column are correctly set up.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Neyney Try with the below code:
Won Oppty Current (#) =
CALCULATE(
COUNTROWS('Open and Won Opportunities Data'),
'Open and Won Opportunities Data'[Report Source] = "Won",
YEAR('Open and Won Opportunities Data'[Actual Close Date]) = YEAR(TODAY())
)
Won Oppty Current ($) =
CALCULATE(
SUM('Open and Won Opportunities Data'[Total Est. Proposal Amt]),
'Open and Won Opportunities Data'[Report Source] = "Won",
YEAR('Open and Won Opportunities Data'[Actual Close Date]) = YEAR(TODAY())
)
Hope this helps!!
If this solved your problem, please accept it as a solutiona and a kudos!!
Best Regards,
Shahariar Hafiz
My LY YTD SALES formula seems off now. My Current Year calculation (CY) based on the max date available on my dataset is working well, which is 1/11/2025, but when I put Last Year's formula in my visual it's showing me all year to December, but I need to see that data from last Year up to the same period this year. My formula seems off, but I can't figure out what it is. Here is what I am using, I tried different formula's but can't get a proper comparison of up to same data side by side:
I tried this one too:
I've tried this one too, but I know it's off since it is using same period last year, but need it to calculate up to same period of current year:
PY =
CALCULATE(
[All Sales Sum],
SAMEPERIODLASTYEAR(
DATESYTD('Paid Date Table'[Date])
)
)
I've tried this one too, but doesn't work either:
LY YTD Sales =
CALCULATE(
[All Sales Sum],
'Paid Date Table'[Date] >= DATE(YEAR(MAX('Paid Date Table'[Date])) - 1, 1, 1),
'Paid Date Table'[Date] <= DATE(YEAR(MAX('Paid Date Table'[Date])) - 1, MONTH(MAX('Paid Date Table'[Date])), DAY(MAX('Paid Date Table'[Date])))
)
Hi @Neyney It looks like you're trying to compare year-to-date (YTD) sales for the current year with the same period last year that means last year up to the same date as this year. You could try datesbetween to specify the date range from the start of last year to the same date last year as the maximum date in your current dataset. Here is the revised verson, you could try:
LY YTD Sales =
CALCULATE(
[All Sales Sum],
DATESBETWEEN(
'Paid Date Table'[Date],
DATE(YEAR(MAX('Paid Date Table'[Date])) - 1, 1, 1),
DATE(
YEAR(MAX('Paid Date Table'[Date])) - 1,
MONTH(MAX('Paid Date Table'[Date])),
DAY(MAX('Paid Date Table'[Date]))
)
),
'Paid Date Table'[IsPast] = TRUE()
)
Hope this helps!!
That is exactly correct! I updated the formula to use DATESBETWEEN but it's now showing blank 😕
What could the issue be? am I not referencing the correct table?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
7 | |
7 | |
4 | |
3 |
User | Count |
---|---|
15 | |
14 | |
11 | |
10 | |
9 |