Forum Discussion
Summarize data under conditions
- 2 years ago
Hi kostask,
Mechanically, you achieve your objective by sumxing over the category field which you are bringing in your visualization rows, for row total to correctly add up with what's being shown in the visualization. If you have a saparate category dimension table with one to many relationship with your fact table 'Sales Table' and the category field from the dimension field is properly used in your visualization, the formula will be referencing that dimension table Category field instead.
A couple of observations:
Since you have properly created the calendar table for date dimension, what about writing the TotalYTD formula like below?
Also, the output produced in the above manner for omitting the previous year sales where there are no sales this year will generate rather misleading information (by omission), and the prior year sales total will not be consistent with the previously reported number.
Hi kostask,
Mechanically, you achieve your objective by sumxing over the category field which you are bringing in your visualization rows, for row total to correctly add up with what's being shown in the visualization. If you have a saparate category dimension table with one to many relationship with your fact table 'Sales Table' and the category field from the dimension field is properly used in your visualization, the formula will be referencing that dimension table Category field instead.
A couple of observations:
Since you have properly created the calendar table for date dimension, what about writing the TotalYTD formula like below?
Also, the output produced in the above manner for omitting the previous year sales where there are no sales this year will generate rather misleading information (by omission), and the prior year sales total will not be consistent with the previously reported number.
Thank you DataNinja777 for the solution and the valuable recomendation!