The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the July 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
112 | |
69 | |
46 | |
43 |
User | Count |
---|---|
186 | |
85 | |
76 | |
74 | |
56 |