You will not be able - except for some very simple cases where blending on one datetrunc period will do - to accomplish this by data blending.
This is what you should do:
1. Download Tableau Desktop 10.5
2. Create single data source out of the two tables like so:
P.S. I would avoid fields values of string type which you want to use as quarter (date) - I converted them in tableau to dates but it may not always be that easy....
Dummy_Prod.twbx 39.8 KB
I was going back home on a tram earlier this afternoon and I realized I
forgot to ascert that both 'version' tables' values must be present. That's
because I used a copy of that table to make second join as tableau/hyper
will not allow to use one field twice - for >= and <.
So a filter in wb (across all sheets and in context would be best) to
ensure say 'product1' and 'product2' is not null.
I'll repost the wb later on or tomorrow morning.
OK, opened my laptop
This is what I meant - and apparently it cannot be worked around in join editor - and correct results, I guess (though product A in Q4 2017 was filtered out as not present in versions):
Dummy_Prod Filter v10.5.twbx 35.8 KB
Actually, the version table provided here uses overlapping start/end ranges. Therefore I used < operator in the second join and it causes product A in Q4 2017 to fall out of the set. So the version ranges should be changed not to evarlap and <= operator used in the second join.
Hey, it turns out it may be done in the join editor - we just have to use another field (version) and inner join.
So first make sure the ranges do not overlap each other:
then make the second join INNER and add the condition: versions.version = versions1.version and <= operaor for quarter comparison:
here are the results:
Dummy_Prod proper v10.5.twbx 40.1 KB
many thanks for the answer.
Regarding the 10.5, I still have to wait for my company to release it and I'm still using the 10.4
I tried to do it on the real data and I can't change the comparison operator in the join clause from "=" to "<=" or ">" in the join editor, neither in the dummy data nor in the real data.
I found the following on this topic: Some Join Operators Unavailable in Excel or Text Data Connections | Tableau Software and by using the legacy connection, I can use the other operators but it only works if the data source is composed of a single Excel file. As soon as I include a second file (also using legacy connector) I can again only use the "=" operator for all join clause, even if the join is made between two tables of one excel.
On your screenshots, there's no mention of you using the legacy connector (appears normally after the type of database e.g. "Excel (Legacy)")
Is it something that comes with the 10.5 and Hyper?
Since using blending doesn't work, do you think there's a workaround if I want to do something similar on published data sources ?
Yes, the < operator is available for joins on excel tables in v 10.5
I do not know other ways to do this than custom sql (but not with excel) or tablea/hyper join editor.
In the pre-10.5 versions a non-equi join could be emulated
by a combination of a cross-join and a (datasource) filter.
Please find the attached version 10.4 with just that.
Dummy_Prod_proper_v10.4_YF.twbx 54.9 KB