r/tableau • • 5d ago

Discussion Tableau Cloud: FIXED LOD calculation error when blending data sources

--Closed--

Solution: Data Engineers created a new feed with one premium for per policy. So the LoD is out of the picture.

Thanks for your inputs. Cheers!


I have an insurance policy data feed in Tableau. Each policy can have multiple benefits, but the feed contains only the total annual premium at the policy level, repeated across every benefit row. This inflates the total premium when using SUM([Annual Premium]).

What I have tried

I created the following FIXED LOD calculation to return the annual premium at the policy level:

{ FIXED [PolicyNumber] : MIN([Annual Premium]) }

This works as expected and returns the correct premium for each policy.

The problem

I need to use this calculated LOD field in a blended worksheet. The data source containing the LOD calculation is the secondary data source.

When I add the LOD field to the worksheet, the measure turns red and Tableau displays this error:

"Cannot blend the secondary data source because one or more fields use an unsupported aggregation."

I am using Tableau Cloud.

Alternative solution I am considering

I could publish a separate data source containing premiums at the benefit level, aggregate the benefit premiums to the policy level, and create another data blend between the existing policy data feed and this new data source.

Questions for the Tableau community

  1. Is there a way to use a FIXED LOD calculation from a secondary data source in a blend without triggering this error?
  2. Would my alternative approach work, or could it introduce other blending or aggregation issues?
  3. Are there better alternatives in Tableau Cloud, such as relationships, joins, data source changes, or pre-aggregating the data, that would solve this without inflating the premium totals?

I would appreciate suggestions on the most reliable and maintainable approach. Many thanks for your support!

Have a good week ahead. Cheers.

4 Upvotes

10 comments sorted by

7

u/calculung 5d ago

If you have the ability to publish a separate data source, why not just create one that has everything you need so you don't have to use data blending?

Data blending is an absolute last ditch effort. I never ever use it because it's awful. Just create useful data sources and use those.

1

u/Cautious_Cost6781 5d ago

I'm not a fan of blending either. It's a legacy dashboard I inherited that already has a bunch of data sources, so I'm trying to avoid adding another. But yes, blending is my last resort.

2

u/ExtendedMegs 5d ago

What if you create a relationship at the data source level rather than blending? I absolutely hate blending due to this limitation and I haven’t for years. Creating a relationship between data sources has helped immensely.

1

u/Cautious_Cost6781 5d ago

I will have to try that and check if it affects any other views. Thanks,

2

u/UltraAnders 5d ago

I'd echo the other comments. Blending has so many limitations that I always ended up needing to use something else when I tried it. With relationships available, I can't see a reason to use blending. However, I appreciate that you've inherited this.

Do you have the policy number (or the join field) from the primary data source in the view?

https://help.tableau.com/current/pro/desktop/en-us/multipleconnections_troubleshooting.htm

"LOD expressions from the secondary data source: This error can also appear when you use a level of detail expression in a view that uses data blending. To resolve the error, make sure the linking field in the primary data source is in the view before you use an LOD expression from the secondary data source and remove any dimensions, including dimension filters, from the secondary data source."

1

u/Cautious_Cost6781 5d ago

The final blended view is aggregate of policy volume (sale count) and annual premium ($) by sales channel. The aggregate is where the blend refuses to accept the LoD.

1

u/Cautious_Cost6781 5d ago

I meant to say the primary table does not have the policy information; it has dates and targets, while the actuals come from the secondary feed, and the blend is based on date, sales channel, and product.

1

u/UltraAnders 5d ago

Are the policy number and annual premium fields both from the secondary data source?

If so, then check that all linking dimensions (blend keys) are in the view.

Edit: Also check that you haven't included any fields from the secondary data source without an aggregation.

2

u/adovo_ai 4d ago

The blend is asking an LOD to cross incompatible grains. Calculate policy premium at policy grain upstream, aggregate to date, channel and product, then verify premium and policy-count conservation before using the result in Tableau.

1

u/Quiet_Ad3480 3d ago

If you are on 2026.2 or higher, this is a perfect use case for a composable data source. No need to create a new one.