That one works, which is static.
The question is, why [Total] is not working. Or how to make Total work?
I responded in the other post with an explanation and a packaged workbook with a couple of solutions.
Could you kindly take a look at this: Cannot Mix Aggregate and Non-Aggregate Comparison or Results in 'IF" expressions
I think this issue is also connected to having blended data sources and I have tried many iterations to either aggregate or dis-aggregate all the fields in my desired calculation without much success. Any help will be greatly appreciated.
Thank you in advance for you time and insight.
2 of 2 people found this helpful
Given the level of nesting of calculations I don’t have time to look at this in detail.
One thing I want to point out since the workbook is using a data blend: You’d written in your initial post "And to show that the above two fields are otherwise working okay on their own, consider the viz below:”. The thing to keep in mind is that in Tableau (and particularly with data blends) fields are not “working on their own”, they are often dependent on the dimensions in the view (and especially so with data blends). Therefore the KPI Viz_3 Check is not the same as the KPI Viz_3 sheet since latter sheet has no dimensions on it (no Date nor Current Period/Previous Period).
Data blends add a huge amount of complexity and to avoid that my general advice (as well as Tableau’s) is to see if you can do a join in your data preparation, data source, or do a cross database join in Tableau before attempting to do a data blend.
If you absolutely must do a data blend then I’d suggest the following:
1) Use the KPI Viz_3 Check to as the basis for the viz since that has the necessary viz Level of Detail to get accurate results.
2) Create calculated fields for each your desired measures that return a single non-Null result. For example IF FIRST()=0 THEN END, or IF FIRST()=0 THEN WINDOW_MAX() END, or something.
3) Make sure all table calculations have fixed compute usings on the dimension(s) that they need to.
4) Build a view based on #2 where you put all the dimensions on Detail and if necessary turn of mark stacking using Analysis->Stack Marks->Off.