Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hello everyone,
I have some issues with the DATEADD function when selecting certain filters on the dashboard for calculating the number of YTD sales for a selected year.
Solved! Go to Solution.
HI @Anonymous
Number of Sales YTD Comparison =
VAR _SD = 'Selected Year'[Parameter Value]
VAR _T =
TODAY()
VAR _TSD =
DATE( _SD, MONTH( _T ), DAY( _T ) )
RETURN
CALCULATE(
DISTINCTCOUNT( 'Sales'[Sales ID] ),
FILTER(
ALL( 'Sales' ),
'Sales'[Sales Date] >= DATE( _SD, 1, 1 )
&& 'Sales'[Sales Date] <= _TSD
)
)
It'd would be great to add a date table to your model and use that, for adding a date table please check this link: https://www.vahiddm.com/post/creating-calendar-table-with-3-steps
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
HI @Anonymous
Number of Sales YTD Comparison =
VAR _SD = 'Selected Year'[Parameter Value]
VAR _T =
TODAY()
VAR _TSD =
DATE( _SD, MONTH( _T ), DAY( _T ) )
RETURN
CALCULATE(
DISTINCTCOUNT( 'Sales'[Sales ID] ),
FILTER(
ALL( 'Sales' ),
'Sales'[Sales Date] >= DATE( _SD, 1, 1 )
&& 'Sales'[Sales Date] <= _TSD
)
)
It'd would be great to add a date table to your model and use that, for adding a date table please check this link: https://www.vahiddm.com/post/creating-calendar-table-with-3-steps
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Time Intelligence Functions need a real date table with full dates.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 8 | |
| 8 | |
| 7 |