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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
joshua1990
Post Prodigy
Post Prodigy

COUNTROWS this week vs last week with specific key

Hello everyone!

I have those 5 tables linked:

  • A simple calendar table (Week, month etc is not shown here but they exists)
  • An attribute list: Attribute per article
  • A sales master: 1 unique row for each Order
  • A booking table: All bookings per order (several rows per order)
  • An archive that shows me the open orders per week.

joshua1990_0-1619946010541.png

 

What I would like now to calculate is this:

  • The number of orders in the archive table that does not exist in this week compared to last week > Lost orders
  • The number of orders in this week, that are listed in the table archive and have a booking = "XX" in the table bookings.

 

How would you do that?

 

3 REPLIES 3
Anonymous
Not applicable

hello @joshua1990 

 

if your archive table has every order number then i would create a distinct table using the order number from archive table.  in power query you could merge the sales and booked table to it and then you will see orders that have a $0 value for booked and or sales 

or you could create a calculated table of disitinct order numbers and then add columns for each table 

 

I would do it in power query and can show you how if you want to send some sample data over 🙂 

daxer-almighty
Solution Sage
Solution Sage

Hi again @joshua1990 

 

Your relationships are certainly not correct. Are you sure you want to have 1-to-1 in your model? I would strongly advise against such a design.

Sry, that true. This is just an issue with the sample data.

The relations are:

Calendar - Sales (One to Many)

Calendar - Archive (One to Many)

Bookings - Sales Master (Many to One)

Archive - Sales Master (Many to One)

Attribute - Sales Master (One to Many)

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

August Carousel

Fabric Community Update - August 2024

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