Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
How to get current week till yesterday Value in stacked Column chart.
For eg- If today is Wedeneaday and in graph the value should display till Tuesday and again the if today is thursday then value should displat till Wednesday like till saturday we want, currently we manually doing this how can do it by Using DAX.
Belwo is the sample data
| Sr No | REPORTDATE | REPORTYEARWEEK | Day | Month Name | Day No | REPORTQTY |
| 1 | 06-11-2025 | 2545 | Thu | November | 4 | 19 |
| 2 | 06-11-2025 | 2545 | Thu | November | 4 | 5 |
| 3 | 05-11-2025 | 2545 | Wed | November | 3 | 22 |
| 4 | 05-11-2025 | 2545 | Wed | November | 3 | 32 |
| 6 | 05-11-2025 | 2545 | Wed | November | 3 | 23 |
| 7 | 05-11-2025 | 2545 | Wed | November | 3 | 9 |
| 8 | 05-11-2025 | 2545 | Wed | November | 3 | 22 |
| 9 | 05-11-2025 | 2545 | Wed | November | 3 | 45 |
| 10 | 12-11-2025 | 2546 | Wed | November | 3 | 71 |
| 11 | 12-11-2025 | 2546 | Wed | November | 3 | 34 |
| 12 | 14-11-2025 | 2546 | Fri | November | 5 | 2 |
| 13 | 14-11-2025 | 2546 | Fri | November | 5 | 21 |
| 15 | 06-11-2025 | 2545 | Thu | November | 4 | 12 |
| 17 | 10-11-2025 | 2546 | Mon | November | 1 | 27 |
| 18 | 11-11-2025 | 2546 | Tue | November | 2 | 14 |
| 22 | 07-11-2025 | 2545 | Fri | November | 5 | 4 |
| 23 | 07-11-2025 | 2545 | Fri | November | 5 | 0 |
| 24 | 07-11-2025 | 2545 | Fri | November | 5 | 1 |
| 25 | 08-11-2025 | 2545 | Sat | November | 6 | 7 |
| 26 | 08-11-2025 | 2545 | Sat | November | 6 | 0 |
| 27 | 08-11-2025 | 2545 | Sat | November | 6 | 21 |
| 37 | 15-11-2025 | 2546 | Sat | November | 6 | 21 |
| 38 | 15-11-2025 | 2546 | Sat | November | 6 | 6 |
| 39 | 05-11-2025 | 2545 | Wed | November | 3 | 15 |
| 40 | 13-11-2025 | 2546 | Thu | November | 4 | 55 |
| 41 | 13-11-2025 | 2546 | Thu | November | 4 | 57 |
| 43 | 13-11-2025 | 2546 | Thu | November | 4 | 31 |
| 44 | 13-11-2025 | 2546 | Thu | November | 4 | 1 |
| 45 | 30-10-2025 | 2544 | Thu | October | 4 | 6 |
| 98 | 29-10-2025 | 2544 | Wed | October | 3 | 19 |
| 100 | 30-10-2025 | 2544 | Thu | October | 4 | 37 |
| 105 | 31-10-2025 | 2544 | Fri | October | 5 | 9 |
Solved! Go to Solution.
pls update the expected output or the sample data and make them are matching. Then that will be helpfule for us to figure out the logics and double check if the solution is correct or not.
Proud to be a Super User!
is the screenshot the expected output?
It looks like the data in the chart does not match the sample data you provided.
Could you pls clarify this?
Proud to be a Super User!
Hello,
Screenshot is the expected output required for me, the data which is shown is the sample data like this we have data format
Hello @hb0135 ,
Thank you @Ashish_Mathur and @ryan_mayu for sharing your response!
Just checking has your concern been resolved? If the provided answer helped, please confirm so others can benefit from the solution too.
Thank you for your cooperation!
Hi @hb0135 ,
I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.
Thank you.
pls update the expected output or the sample data and make them are matching. Then that will be helpfule for us to figure out the logics and double check if the solution is correct or not.
Proud to be a Super User!
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
One of ways is to have Calendar Dimension table, and then try to filter the calendar table inside CALCULATE function in the measure.
Expected result: =
VAR _today =
DATE ( 2025, 11, 13 ) // assume today is 20251113, in a real DAX measure, insert the dax function TODAY()
VAR _daynumber =
WEEKDAY ( _today, 2 )
RETURN
CALCULATE (
SUM ( Data[REPORTQTY] ),
KEEPFILTERS (
FILTER (
ALL ( 'Calendar' ),
'Calendar'[REPORTDATE] <= _today && 'Calendar'[Day No] <= _daynumber
)
)
)
Hey @hb0135 ,
Please try the method provided by @Jihwan_Kim. Just a thing I wanted add was, from my understanding, you want just the data from the current week. In that case, you can introduce a week filter in the FILTER expression. In case you would like a reusable script to construct a date table, please refer to a script provided by RADACAD: https://radacad.com/download/15507/?tmstv=1763353612.
You will need to make some changes in the script for start and end of the date range.
Let us know if you encounter any issues.
Hope it helps!
Hi @hb0135
Assume you want to show data for the last 7 days, except today
The following may help you achieve this.
Proud to be a Super User! | |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 118 | |
| 98 | |
| 70 | |
| 69 | |
| 65 |