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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello guys!
I am new to Power BI and I need some help.
YTD calculation stops working correctly when I add Date column not from the Date Hierarchy.
This is my DAX formula:
But when I add Date field from another linked table, it works incorrectly, treats new column as a dimension and the number of rows is multiplied:
Joins between tables are configured correctly the problem is in calculation as I think. Could you maybe help how to solve it?
I want to ınclude ın my Vız date from the 'Fact' table, not from the separate Date hierarchy.
Solved! Go to Solution.
@Anonymous , try like the example. The two comments at end are alternate
YTD QTY forced=
var _max = //or maxx(allselected('Order'),'order'[Date]) //max date in table
return
if(max('Date'[Date])<=_max, calculate(Sum('order'[Qty]),DATESYTD('Date'[Date])), blank())
//or
//calculate(Sum('order'[Qty]),DATESYTD('Date'[Date]),filter('Date','Date'[Date]<=_max))
//calculate(TOTALYTD(Sum('order'[Qty]),'Date'[Date]),filter('Date','Date'[Date]<=_max))
Thanks!
@Anonymous
The rules of correct PBI model design dictate that:
1. You should hide your fact table's columns.
2. You should only slice by dimensions. I can't stress this enough.
3. Your model should be a star-schema.
If you stick to these golden rules, you won't have problems.
@Anonymous , try like the example. The two comments at end are alternate
YTD QTY forced=
var _max = //or maxx(allselected('Order'),'order'[Date]) //max date in table
return
if(max('Date'[Date])<=_max, calculate(Sum('order'[Qty]),DATESYTD('Date'[Date])), blank())
//or
//calculate(Sum('order'[Qty]),DATESYTD('Date'[Date]),filter('Date','Date'[Date]<=_max))
//calculate(TOTALYTD(Sum('order'[Qty]),'Date'[Date]),filter('Date','Date'[Date]<=_max))
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 6 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 18 | |
| 14 | |
| 14 |