March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a date slicer and need to calculate the sum of sales based on the end date in the slicer.
I want to calculate sales for the week ending on the Friday preceding the end date in the slicer.
I calculated the start and end date for the week I want to sum the sales:
DATE START Current Week - 1
DATE END Current Week - 1
NOW, when I use those dates to sum the sales, I get 0 in all cases. I can't figure out what I'm doing wrong:
Solved! Go to Solution.
I figured this out.
To calculate the Start date, I used the following:
To calculate SALES for dates during the week, I used the following:
SALES Current Week - 1 =
CALCULATE(
SUMX(TABLE, TABLE[Sales]),
FILTER(
'TABLE', TABLE[DATE] >= MAXX(TABLE,TABLE[DATE START Current Week - 1]) &&
TABLE[DATE] <= MAXX(TABLE,TABLE[DATE END Current Week - 1])
)
)
I figured this out.
To calculate the Start date, I used the following:
To calculate SALES for dates during the week, I used the following:
SALES Current Week - 1 =
CALCULATE(
SUMX(TABLE, TABLE[Sales]),
FILTER(
'TABLE', TABLE[DATE] >= MAXX(TABLE,TABLE[DATE START Current Week - 1]) &&
TABLE[DATE] <= MAXX(TABLE,TABLE[DATE END Current Week - 1])
)
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
126 | |
85 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |