Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

undefined

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

 

 

 

 

 

2 REPLIES 2
Anonymous
Not applicable

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.

amitchandak
Super User
Super User

@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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.