Forum Discussion
cpiercey
6 years agoFrequent Visitor
Calculated Column Constraints with Data Table
Hello, I am experiencing an unexpected issue with a calculated column and I am wondering if it has to do with the way I created the table it is referencing. I have the following tables: 1. Unfilt...
- 6 years ago
Thanks for the response, AllisonKennedy. I ended up adding additional context to the original formula which allowed the calculation to execute at the row-level. The end result needed to be a summation of quantities for each item in a given time period based on a transaction table with many transactions for that item. I have it working now, I also took your advice on the DimDate table, thanks for the tip.
AllisonKennedy
6 years agoCommunity Champion
cpiercey Can I ask what result you are expecting?
You are doing a SUM inside a calculated column, which is generally not advised. You have nested it inside a CALCULATE which does change the context and makes it provide ok results, but I still don't recommend this approach.
What do you want as an end result?
Try using calculated MEASURES for some of your formulas instead, and put them in a matrix visual with Year and Quarter.
I also recommend using a DimDate table rather than the Forecast table dates: https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
You are doing a SUM inside a calculated column, which is generally not advised. You have nested it inside a CALCULATE which does change the context and makes it provide ok results, but I still don't recommend this approach.
What do you want as an end result?
Try using calculated MEASURES for some of your formulas instead, and put them in a matrix visual with Year and Quarter.
I also recommend using a DimDate table rather than the Forecast table dates: https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html