If you cold add packaged workbook (**.twbx) , it's really helpful/easy for us to start investigating.
What was the problem when your tried the last formula if Curr FICO > 300 then sum([Curr FICO] * Src Outstandings]) / sum(Src Outstandings]) End
were you not getting an answer or were you getting the wrong answer and are the data coming from the same source, are there Nulls in the data that need to be accounted for with zn() funcitons or ifnull statements? On the surface it looks like the formula should have worked
Let me know if this helped
That gives me the aggregate/non-aggregate mixing error.
Thanks now that is something we can workd with
ALL of the data fields need to be aggregated as in
if Attr(Curr FICO) > 300 then sum([Curr FICO] * [(Src Outstandings]) / sum([Src Outstandings]) End
Attr(Curr FICO) > 300 - you can either use attr(), Max(), or Min() depending on your data and what makes sense in your if test''
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
1 of 1 people found this helpful
Interesting your own manual solutions is the corect one - I just put the formulas for the Numerator and denominator into a single formula and it illustrates the issue
sum(if [Discount] > 0 then [Discount]*[Sales] END) /sum(if [Discount] > 0 then [Sales] END)
Each part is only true when the discount is % 0 and it is only after the test that you perform the aggregation -
you want the numerator TOTAL divided by the denominator TOTAL - and not the total after the division has been made
Yeah, Tableau is parsing it strangely, compared to other languages, I think. Thanks again.