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
Hi,
Does anyone know if I can somehow use the parameter for the year-end date? I would like "06-30" in below formula to be replaced with a parameter
Act GC YTD = CALCULATE (
SUM ( 'General Ledger'[GrossAmt_GC] ),
ALL ( 'Calendar' ),
DATESYTD ( 'Calendar'[Date] , "06-30")
)
Solved! Go to Solution.
Hi, @Metricbits
According to your description, I guess that you want to create a slicer to get the end date and calculate the sum of [GrossAmt_GC] based on the end date dynamically, right? I think you can try this method to achieve this:
This is part of my test data based on your DAX formula:
Act GC YTD =
var _year=YEAR(TODAY())
var _month=MONTH(MIN('Calendar'[Date]))
var _day=DAY(MIN('Calendar'[Date]))
return
CALCULATE(
SUM('General Ledger'[GrossAmt_GC]),
FILTER(ALL('General Ledger'),[Date]>=DATE(_year,1,1)&&[Date]<=DATE(_year,_month,_day)))
And you can get what you want.
You can download my test pbix file below
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Metricbits
According to your description, I guess that you want to create a slicer to get the end date and calculate the sum of [GrossAmt_GC] based on the end date dynamically, right? I think you can try this method to achieve this:
This is part of my test data based on your DAX formula:
Act GC YTD =
var _year=YEAR(TODAY())
var _month=MONTH(MIN('Calendar'[Date]))
var _day=DAY(MIN('Calendar'[Date]))
return
CALCULATE(
SUM('General Ledger'[GrossAmt_GC]),
FILTER(ALL('General Ledger'),[Date]>=DATE(_year,1,1)&&[Date]<=DATE(_year,_month,_day)))
And you can get what you want.
You can download my test pbix file below
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Can you explain further what you are trying to accomplish? Parameters are used in the query editor (What If Parameters on the DAX side). If you want users to be able to dynamically select which year end to use, you could add a disconnected table with a text column (for the slicer) and a numeric or date column to be used in a Measure to dynamically adjust results based on the selected year end.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Yes, this is exactly what I am trying to do. I a nutshell, I am building a template that will be used by multiple orgs. They have different FY end dates. But when I try to put a reference to a table or column in this formula (DATESYTD), it PBI doesn't accept it.
@Metricbits , i have the exact same requirement.. Were u able to achieve it ? Please share the outcome
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!