The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
45 |