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.
1. I want help in writing DAX for calculating "sales" for particular year (example:sum of sales where year = ‘1900-01-01 00:00:00')
2. for the above DAX formula I need to add "location" of store, ("sales" for particular year where location is "Auckland")
Solved! Go to Solution.
Hi @Reddyp ,
You could try below code:-
CALCULATE (
SUM ( Table1[Amount] ),
FILTER ( Table1, Table1[Date] = DATE ( 1900, 01, 01 ) ),
FILTER ( Table2, Table2[Location] = "Auckland" )
)
BR,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Reddyp ,
You could try below code:-
CALCULATE (
SUM ( Table1[Amount] ),
FILTER ( Table1, Table1[Date] = DATE ( 1900, 01, 01 ) ),
FILTER ( Table2, Table2[Location] = "Auckland" )
)
BR,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
@amitchandak this can't be worked when "Location" details are on different table (Table 2) right ?
calculate( sum(Table1[Amount]), filter(Table1, Table[Date] = date(1900,01,01) && Table1[Location] = "Auckland") )
help me out in applying filter on columns from different tables