Attached is an extremly simple workbook with very little data. My problem is that SUM(revenue) is correct, but SUM(investment) is not correct. Here it shoud show the last entry (e.g. with filtered of the dates 2022-06 and 2022-07 it should show 1.280 and not the sum of both of them (2.490) and this is not correct. I cant use an average or anything as this would not be accurate.
Please ignore the fact that this is a map, with the real data the map is working fine, with this data not but I cant find the problem. In the real workbook there are a lot of dots on the map and each dot has in its quickinfo the sum(revenue) which is fine and should have the investment but only of the latest date.
How can I solve this that in one sheet I have fields which need to be summed up (revenue) and some which are not summed up only used the latest date (max([date])?
Thanks in advance and best regards,
Michael
@Michael Hess
For the LoD method, you need to put the date filter in context for it to work for any date other than the last one. Early in your training, you should be taught the Order of Operations. For C_Investment (LoD), you only need to know the following order.
Context Filter
Fixed LoD
Dimension Filter
If you have two dates (e.g., January 1st and February 1st), the fixed LoD {MAX([Datum1])} will return February 1st. If you use a dimension filter (the default when a dimension is added to the filter shelf) and select January 1st, then nothing will be returned because the calculation will only return a value if [DATE]={MAX([Datum1])} and January 1st does not equal February 1st.
If you add the [Date] filter to context (click on the pill and select 'Add to Context'), then it will be evaluated before the FIXED LoD is calculated. The maximum date is now January 1st, so the calculation will return a value.
James Emery
Tableau Forum Ambassador
Once a response addresses your problem, please click 'Select as Best' so future users can quickly find the answer.