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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
i have created a mesure,but its picking LASTYEAR value while seaching WITH slizer
dax:CALCULATE(SUM(SALES[Sales Amount]),FILTER(ALL(SALES),SALES[Posting Date]<=MAX(SALES[Posting Date]) && [SALES GROUP]=MAX(SALES[SALES GROUP])))
i want to get only the currnet year
Solved! Go to Solution.
Hi @hueuro ,
Please try this way:
Here is my sample data:
I create a slicer accroding to this table:
Try to use this DAX to create a new measure:
Measure =
CALCULATE(
SUM('Table'[Sales Amount]),
'Table'[Sales Group] = SELECTEDVALUE('Table'[Sales Group]),
DATESBETWEEN(
'Table'[Posting Date],
STARTOFYEAR('Date'[Date]),
SELECTEDVALUE('Date'[Date])
)
)
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @hueuro ,
Please try this way:
Here is my sample data:
I create a slicer accroding to this table:
Try to use this DAX to create a new measure:
Measure =
CALCULATE(
SUM('Table'[Sales Amount]),
'Table'[Sales Group] = SELECTEDVALUE('Table'[Sales Group]),
DATESBETWEEN(
'Table'[Posting Date],
STARTOFYEAR('Date'[Date]),
SELECTEDVALUE('Date'[Date])
)
)
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.