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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Tom_Burns
New Member

Dynamic Sales orders and backlog

Hi all,

 

Fairly amateur Power BI user here!  I have tried to do this in as many ways as my brain can manage but am completely stuck - massively appreciate anyone's advice.

 

I have a data set, to keep things simple, that just includes these columns:

 

  • Order Week Reference
  • Order Number
  • Value
  • Invoiced Week Reference

Example

 

Order Week RefDetails Value Invoiced Week
1Order 1  50,000.003
1Order 2  60,000.002
2Order 3  20,000.003
2Order 4  25,000.005
3Order 5  55,000.004
3Order 6  60,000.005
4Order 7  80,000.00 
4Order 8  10,000.00 

Each week, i have to update a sales order report (these lines get added and tagged with the latest order week reference)

 

It can take 1-4 weeks lead time for an order to be shipped out and then invoiced.  So at any point in time, my data set will include backlog (which will be orders not shipped).

 

I am trying to work out how to show the following tables, for a selection on a slicer for the order week reference

 

  • New orders placed in the week
  • Current backlog 

New orders is the easy bit, I get stuck with the backlog.  I have tried all sorts of ways to do it but can't seem to figure it out.  

 

For clarity, if the week selction is week 1, you would expect to see order 1 and order 2 in both tables.

If the selection week is week 4, you would expect to see order 7 and 8 in the new orders table and then orders 4,6,7 and 8 in the backlog table (since they are either not yet invoiced or invoiced later than week 4 selected).

 

I have tried all sorts of ways of using different date tables, making the date table relationships inactive and using the 'userelationship' function, have tried using calculatetable etc as well....as i said, I am an amateur and have probably missed something obvious.  Please help!

 

If anyone can figure it out or give me some tips, I'd be eternally grateful.

 

Tom

2 REPLIES 2
WinterMist
Impactful Individual
Impactful Individual

@Tom_Burns 

 

This reminds me of a problem that @DataInsights helped me with some time ago.

 

Your table visual example states:

IF WeekSelected = 4 THEN 

   - BackLog Orders: Orders 4, 6, 7 & 8

 

NOTE: As you know, this outcome includes rows which are OUTSIDE of the FC (filter context) of the slicer.  And this is what causes the challenge.

 

WinterMist_0-1678295822775.png

 

To make this happen, I interpreted your BackLog logic as follows:

   IF (

      [Invoiced Week] > [WeekSelected]) OR

      [Invoiced Week] IS NULL

   )

   THEN it's a BackLog record

 

As you stated, when you select 'Data 1'[Order Week Ref] in the slicer, it always removes records that you want to keep in the BackLog table.  I remember your frustration very well.

 

To work around this, take the following steps:

 

1) Create a new table which is a copy of the first table.  

WinterMist_1-1678296186149.png

 

WinterMist_11-1678298028983.png

 

WinterMist_12-1678298131688.png

 

NOTE: There is no relationship between these 2 tables.

 

2) Make sure that each table visual pulls from the correct model table:

   - "New Orders" table visual must pull all its fields from 'Data 1' model table (so that the slicer affects it).

   - "BackLog" table visual must pull all its fields from 'Data 2' model table ( so that the slicer will NOT affect it).

 

3) Create a measure that gets the WeekSelected from the 'Data 1'[Order Week Ref] slicer:

WinterMist_3-1678296335468.png

 

4) Create a measure that identifies the rows in 'Data 2' that meet the above interpreted logic for BackLog records:

WinterMist_4-1678296834271.png

 

5) Add both measures to the Backlog table visual to test it:

WinterMist_5-1678296966115.png

WinterMist_6-1678297012611.png

WinterMist_7-1678297065025.png

WinterMist_8-1678297126065.png

 

Test Results: Working according to interpreted logic.

 

6) Select the BackLog table visual and change the filter on the measure for the visual to only include where 02 IsBackLog = 1.

WinterMist_9-1678297267383.png

 

Once the filter is applied, now only the desired records appear in the BackLog table.

WinterMist_10-1678297335683.png

 

I hope this is helpful to you.

 

Regards,

Nathan

amitchandak
Super User
Super User

@Tom_Burns , Do you have one table or 2 tables? If you have two tables, you can join both with a common date table and create measures for new and backlog.

 

If you have only one table backlog logic is not very clear

 

for new logic

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...

 

Common tables

Power BI- DAX: When I asked you to create common tables: https://youtu.be/a2CrqCA9geM
https://medium.com/@amitchandak/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-soluti...

 

If this does not help
Can you share sample data and sample output in table format?

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.