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
How to caluclate the Weekback 0 column based on Another column in same table using DAX function
But here condition if Weekback 0 means
Week Back 0 is sum of Forecast (Requirement Qty) where Week Back Number = 0
For Example there are three Weekback Number, Requirement Qty and Weekback columns in Same Table
If Weekback number =0 then we need to get sum of Forecast (Requirement Qty) then that will Weeback 0 column.
If Weekback number =1 then we need to get sum of Forecast (Requirement Qty) rthen that will Weeback 1 column.
If Weekback number =2 then we need to get sum of Forecast (Requirement Qty) then that will Weeback 2 column.
Like this my condition goes on.
can you please provide any logic
Hi @Anonymous ,
I think you may try SWITCH function.
It evaluates an expression against a list of values and returns one of multiple possible result expressions.
Is it possible to provide some dummy data and expected results?
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
refer if my WOW blogs can help
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |