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.
Hi All , I need a dax command for adding up the amount i.e from 9.05.20 to 27.06.20 so i should get a total of 240.It would be great if any one could help with the formula. Thanks in advance for helping out.
@AjayRangarajan , Assuming your dates are in DD-MM-YYYY format. You can use a date slicer on week start date and filter
Sum(Table[Amount])
You can create a measure like
calculate ( sum ( Table[Amount] ),
filter (Table ,Table[Week Starting Date] >= date ( 2020, 05, 09 ) && Table[Week Starting Date] <= date ( 2020, 06, 20 ) ))
Filter can be
filter (Table , or filter (allselected(Table) , or filter (all(Table) ,
Depending on what you want to ignore
Hope date is correctly detected as date, else refer
@AjayRangarajan Try this:
=
CALCULATE (
SUM ( Table[Amount] ),
FILTER (
ALL ( Table ),
Table[Week Starting Date] <= DATE ( 2020, 06, 27 )
&& Table[Week Starting Date] >= DATE ( 2020, 09, 05 )
)
)
User | Count |
---|---|
14 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
28 | |
17 | |
11 | |
7 | |
5 |