Hi guys
I'm completely stuck on this.
I have a really strange table created by the connector we're using to pull data from NetSuite into SQL.
I've mocked up a sample of the table here
The first 14 lines are orders for the 12th Jan (filtered by the date slicer on the page). Some trucks have more than 1 order against them for that day.
The Fleet Name.2 column is a master list of all the trucks we have in the company. It's not related to any orders.
I need to be able to produce a list of all the Trucks that did not have an order against them for this date (or any date the date slicer is set to)
Any ideas? Thanks in advance!
Solved! Go to Solution.
Attached is a start on your pbix file. It includes the following:
You will need to update the Source line in each query with the path to your local file. Note that it is better to store your files on SharePoint or OneDrive (so you can easily set up scheduled refresh and collaborate with others), but local file is OK too.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
You can just make one query using just the FleetName.2 column (remove other columns and remove blank rows) to make a Trucks table, and a 2nd with your other columns (also remove blanks) called Locations (or whatever you want). You can then add a Date table, and relate the Trucks and Date tables to the Locations table (1:Many) on the matching columns.
In your visuals, you can just add "+ 0" to your measures to see Trucks with no data on those days.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Listen to @mahoneypat. He's forgotten more about Power BI than most of us ever knew 🙂
Too kind @littlemojopuppy . While I have been studying M and DAX for almost 10 yrs, I still aspire to be as good as Marco/Alberto in DAX or Chris/Imke in M.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi Pat
thanks so much for your reply.
I have no idea how to do any of that lol.
Would you be able to give me a step by step please?
Ok. Please supply your sample data (not as an image). You can insert a table in your reply and paste it there, or provide a link to your data as csv or xlsx on Google Drive, OneDrive, other. I (or someone else in the community can send you back a pbix file as an example.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Thanks Pat
I remembered I also need to exclude any trucks with a retirement date so I've added that as well
Attached is a start on your pbix file. It includes the following:
You will need to update the Source line in each query with the path to your local file. Note that it is better to store your files on SharePoint or OneDrive (so you can easily set up scheduled refresh and collaborate with others), but local file is OK too.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Amazing!
Thanks SO much Pat. I've manged to achieve what I needed to using your example and tweaking it to match my SQL source.
I bow to your PBI power! 😄
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!
User | Count |
---|---|
119 | |
76 | |
65 | |
53 | |
51 |
User | Count |
---|---|
183 | |
101 | |
80 | |
79 | |
77 |