Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hello I'm new to powerBI
Is there a way to create a variable or parameter like vMaxYear = year(max(TrxDate)) and then use this parameter or variable in the filter of a calculate Dax expression?
You could declare a variable as below
LatestYearSumTotal =
VAR MaxYear = YEAR(max(Orders[OrderDate]))
RETURN
CALCULATE(
SUM(Orders[Freight]),FILTER(Orders,YEAR('Orders'[OrderDate])=MaxYear))
So the answer is probably yes, but would need more specifics.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 24 | |
| 22 | |
| 20 | |
| 18 | |
| 13 |
| User | Count |
|---|---|
| 69 | |
| 57 | |
| 42 | |
| 42 | |
| 30 |