Start learning
Explore Bezadome

Learn from the best to be the best.

Find your category

Agribusiness & Cooperative Management

Hospitality, Tourism & Events

Business & Entrepreneurship

Leadership & Career Development

Design, Media & Content Creation

Modern Workplace Skills

Procurement & Logistics

Fashion, Tailoring, Footwear & Accessories

Music, Dance & Sound

Computer & Digital Skills

Sales & Marketing

AI and Digital Productivity

Data and Business Analysis

Fitness, Movement & Wellbeing

Digital Marketing & Social Media

Human Resources & Workplace Safety

Project and Community Impact

Hair, Barbering, Beauty & Salon Services

Public Speaking, Communication & PR

Construction, Property & Facilities Operations

English for Life, Study, Work and Business

Household Services & Care

Customer Care & Service Operations

Energy & Mineral Industries

Finance, Bookkeeping & Money Management

Education, Tutoring & Training Design

Environment, Forestry & Sustainability

IT Support & Software Quality

Languages

Manufacturing & Quality Operations

Office Administration

Retail Operations

Healthcare Administration

Union stock events without multiplying an opening balance

30 min estimated lesson time

View full course

Preview progress is not saved.

Which rows belong in the Tableau ledger union?

Count the rows and their quantities on the data-source canvas before creating the first sheet.

12 opening rowsOne per branch and product · 312 units
62 movement rowsOne per movement ID · +66 units net
74 ledger rowsOne opening or movement per row · 378 units through 30 April
Check your reading

Keep the 12 physical observations from counts.csv outside the union. Adding them as movement events would count observed stock a second time.

Open the case files, data dictionary and portfolio challenge

A warehouse records an opening quantity once for each branch-product, then posts signed changes. Each physical count is an observation against which the calculated book can be checked. Applying the opening to every movement or adding the count to the ledger would corrupt the book.

  1. Download opening.csv, movements.csv, counts.csv and products.csv into one folder. Reserve may-movements.csv for the final challenge. In Tableau Desktop connect to a text file in that folder. On the Data Source page create a manual New Union containing only opening.csv and movements.csv. Use the physical canvas within one logical table if needed. Name the logical table Ledger. Leave counts outside the union.
  2. Set opening_date to Date, event_time to Date & Time, quantities to whole numbers and identifiers to String. Tableau may prettify names in the Data pane. Rename fields to their source headers or insert the matching field names through the calculation editor. Rows from the opening file have opening_units; movements have units_delta and move_id.
  3. Create Event delta and Event instant with the calculations below. Check opening rows have a quantity, movements have a nonblank unique move_id and a signed quantity, and no row contains both an opening and a movement. Keep issue quantities negative as supplied.
IF NOT ISNULL([opening_units]) THEN [opening_units] ELSE [units_delta] END
IF NOT ISNULL([opening_units]) THEN DATETIME([opening_date]) ELSE [event_time] END

On an unfiltered sheet COUNT(opening_units) gives 12, SUM(opening_units) gives 312, COUNT(move_id) and COUNTD(move_id) both give 62, and SUM(units_delta) gives +66. The union has 74 rows.

Tableau guide to unions

YOUR NEXT STEP

Explore the complete course.

Review the curriculum, requirements and enrolment options before you decide.

PASS ON A POSSIBILITY

Share this course

Help a friend or colleague discover their next skill.

Share on WhatsAppChoose who to share with in WhatsApp. You decide what to send.
Recommend to your team by email