Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
dann_dlr
New Member

Combine PivotTables using RELATED/LOOKUPVALUE

Hello, i'm quite new to PowerPivot/DAX in Excel and have a seemingly super simple question that I can manage to calculate in normal Excel formulas, but can't seem to get working in a PivotTable.

 

I have an extensive history of booked tasks with a date, daily description, a task number and an amount in USD. An example of this table is given below. This table is exported from an external program almost daily and therefore subject to changes. I have therefore added this to my datamodel using a 'Dynamic Range' using the Offset trick.

 

DateDaily_DescriptionTask_nrAmount
1-2-2023Direct saleTK202000
1-3-2023Direct saleTK101000
15-2-2023Extra sales from door-to-door-sales XA2500
29-3-2023Direct saleTK301000
7-2-2023Direct saleTK103500
6-3-2023Add. sales from tradeshowXA1200
21-3-2023Direct saleTK103600
27-2-2023Direct saleTK304800
5-3-2023Direct saleTK102100
2-2-2023Direct saleTK10700
24-2-2023Direct saleTK10300

 

Most of these tasks are booked directly on a Task number, however some are booked on a 'general number' (XA) and need a manual allocation, based on the Daily_Description column to the correct Task number. This is done in a separate table, as shown below:

Additional_sales_descriptionRelated_Task_nr
Extra sales from door-to-door-sales TK20
Add. sales from tradeshowTK10

 

Lastly, each Task comes with a specific task description, separate from the daily description. This task description is also manually entered in a separate table, as shown in the example below:

 

Task_DescriptionTask_nr
Task Description 20TK20
Task Description 10TK10
Task Description 30TK30

 

What I would like now, is a PivotTable that shows all of these things combined per task for both a specific period and in total. 

 

The PivotTable should combine the Task Description from table 3 for each task with the direct sales for a specific period (which is done by a PivotTable Timeline), as well as the indirect/additional sales per task from table 2. 

 

The table should look like this with the period after March 1st, 2023 (01-03-2023). (Dates are in dd-mm-yyyy). Bold columns are columns I can't seem to get working.

TaskDescriptiondirect_sales_periodindirect_sales_perioddirect_sales_totalall_sales_total
TK10Task Description 10670012001120012400
TK20Task Description 200020004500
TK30Task Description 301000058005800

 

The direct_sales_period is just a regular SUM with a filter and the direct_sales_total is a SUM with ALL dates.

 

However, the indirect_sales_period and all_sales_total rely on a link with table 2 and I can't seem to get it working with either a Relationship (RELATED) or a LOOKUPVALUE. Even for the simple Task Description from table 3, it doesnt seem to work. What is the correct way to approach this? In regular Excel formulas I would just use some SUMIFS.

1 REPLY 1
wdx223_Daniel
Community Champion
Community Champion

wdx223_Daniel_0-1681789164174.pngwdx223_Daniel_1-1681789195868.png

 

 

wdx223_Daniel_2-1681789208859.png

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.