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.
Hello,
I am new to DAX. To get the sales of last 14 days, I wrote the below query
Solved! Go to Solution.
Hi @Anonymous
Are you trying to calculate the total sales for 14 days from today? If so please use
Contracts created in Last 14 Days =
VAR EndDate =
TODAY ()
VAR StartDate = EndDay - 14
RETURN
CALCULATE (
[Total Sales],
'Calendar'[Date] <= EndDate,
'Calendar'[Date] >= StartDate
)
Hi @Anonymous
Are you trying to calculate the total sales for 14 days from today? If so please use
Contracts created in Last 14 Days =
VAR EndDate =
TODAY ()
VAR StartDate = EndDay - 14
RETURN
CALCULATE (
[Total Sales],
'Calendar'[Date] <= EndDate,
'Calendar'[Date] >= StartDate
)
User | Count |
---|---|
14 | |
12 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
13 | |
8 | |
5 |