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
Hello All,
I have a report where I am having daily dates and sales.
My requirement is I need to show week to date sales dynamically.
If the end user runs the report today I need to show 26,27 and 28 sales sum ( 800)
If the end user runs report tomorrow then I need to show 26,27, 28 and 29th sales sum
Could any one please help how to do.
Date Sales
21/11/2023 | 100 |
22/11/2023 | 200 |
23/11/2023 | 300 |
24/11/2023 | 600 |
25/11/2023 | 200 |
26/11/2023 | 100 |
27/11/2023 | 500 |
28/11/2023 | 200 |
output : | |
wtd sales | 800 |
Hello @Anonymous,
Can you please try this DAX:
WTD Sales =
CALCULATE(
SUM(TableName[Sales]),
FILTER(
TableName,
TableName[Date] >= STARTOFWEEK(TODAY()) &&
TableName[Date] <= TODAY()
)
)
Should you have any questions, please do not hesitate to reach out to me.
Hi @Sahir_Maharaj ,
Thanks for your respense.
Since I have lot of measures in my report I need only wtd calculation so that I can keep in filters and select true.Then all the measures will change based on calculation
Can you please change your calculation to give the wtd instead of calculation sales for wtd
Please see the below tutorial , hope this helps.
Default dynamic Date Slicer and also custom select Dates in PowerBI | MiTutorials - YouTube
@Anonymous
What is the Logic, you need to show the last 3 days' data or the last 4 days' data
In your 1st Example, you are showing last 3 days data
In 2nd example, you are showing last 4 days data
I am not clear about the logic.
Proud to be a Super User! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |