Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
271 views
in Technique[技术] by (71.8m points)

Tableau filter based on multiple parameters?

I have some data like this below

data image see link

I would like to make a dashboard that will show you all the related empires based on what you choose (those that existed at the same time AND those in one of it's regions of influence). For example if I choose Rome then it will only show Egypt, Greek and Gaul and not show Byzantine because it is from a later time and not show China because it is in a different region. See below

See expected result picture in link


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The simple way to achieve this task is to "Self-Join" I would self-join the data again with Inner join on Region and Era

something like this

then, to handle the duplicate rows I would create a calculation

[Empire_Data1] = [Empires_Data2]

and put as false in the filter shelf. then if you drag both Empires field you will the output you are looking for,

In my data, I'm calling "Empire_data2" as Relevant Empire

Since this is like 20 rows of data, you can perform a self join without any challenge. But you have a lot of rows as in hundreds of thousands or more then, you might want to prep your data before connecting to the tableau.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...