Forum Discussion
DAX - Allocate Program Type
- 7 years ago
Hi Anonymous
You may add the index in query editor.Please check the file.
Regards,
Cherie
v-cherch-msft - What would be the best way to index this? I tried to index by work order# but they are not sequenitally related to a specfic contract or date.
Hi Anonymous
It's always best to post your data in text/tabular format in addition to a screen capture. People trying to help can then readily copy the sample data and run some tests if they need to.
Based on my test,the above formula can be used for my scenario as below.Attached the sample file.Please let me know what's the issue for your data.
Regards,
Cherie
- v-cherch-msft7 years agoMicrosoft Employee
Hi Anonymous
You may add the index in query editor.Please check the file.
Regards,
Cherie
- Anonymous7 years agoNot applicable
Attached is were the problem in the last total is not allowing for proper allocation of the proram amount. I think it has to do with date receive. What would you recommend? v-cherch-msft
Here is the data and screen shot...Also attached the pb file.
Syntax =
LastTotal = CALCULATE(SUM(TableA[Total]),FILTER(TableA,TableA[Name]=EARLIER(TableA[Name])&&TableA[Date Receive]=EARLIER(TableA[Date Receive])-1))Date ReceiveNameYearAmountTotalLastTotalProgramAContract No
1/2/2018 a 2018 150 150 150 1 1/3/2018 a 2018 150 300 150 150 1 1/4/2018 a 2018 150 450 300 150 1 2/1/2018 a 2018 150 1650 500 1 1/5/2018 a 2018 150 600 450 50 1 1/6/2018 a 2018 150 750 600 0 1 1/7/2018 a 2018 150 900 750 0 1 1/8/2018 a 2018 150 1050 900 0 1 1/9/2018 a 2018 150 1200 1050 0 1 1/10/2018 a 2018 150 1350 1200 0 1 1/11/2018 a 2018 150 1500 1350 0 1 1/2/2018 b 2018 150 150 150 2 1/3/2018 b 2018 150 300 150 150 2 1/4/2018 b 2018 150 450 300 150 2 1/5/2018 b 2018 150 600 450 50 2 1/6/2018 b 2018 150 750 600 0 2 1/7/2018 b 2018 150 900 750 0 2 1/8/2018 b 2018 150 1050 900 0 2 - Anonymous7 years agoNot applicable
v-cherch-msft one more thing. There are multiple reciecpts per day per the same contract. My apologies for not displaying that in the model.
- Anonymous7 years agoNot applicable
v-cherch-msft Worked perfectly! Huge thanks!!