SHRIN
SHRIN

Reputation: 328

In tableau how to show unmatched row in my case?

I'm new to tableau.

I have a data like this.

[department]

enter image description here

[employee]

enter image description here

And I want to get employee count under 30 age per department. like this..

[my goal]

enter image description here

I want to show all departments (if there is no employee)

To get result, I do these steps,

But I could only get like this.

[my result]

enter image description here

How can I get my goal..!!?? Help me!!

Upvotes: 1

Views: 514

Answers (1)

AnilGoyal
AnilGoyal

Reputation: 26218

It is simple hereafter. Use join (instead of relationship) on the side of dept table and Take dept_no column from dept_table instead of emp_table. To do this follow these steps

  • double click on first added table (say emp). A join window will open (thgis differs from relationship)

  • add dept table and use right join

enter image description here

  • right click age convert to dimension

  • right click again age and convert to continuous

  • create filter at most 29 on age and don't forget to check include null values in the table

enter image description here

  • If you want to add all values in view. create a calc field with calculation as
INT([Age] <30)
  • add sum of this field to view

enter image description here

  • edit the calculation to show all nulls as 0
ZN(INT([Age] <30))

enter image description here

Upvotes: 2

Related Questions