• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Database Design & Tool Selection|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Database Design & Tool Selection|VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosDatabase Design & Tool Selectio…
sp_PrintTopic sp_TopicIcon
Database Design & Tool Selection
Avatar
Tanya McIlravy
Member
Members
Level 0
Forum Posts: 11
Member Since:
September 29, 2021
sp_UserOfflineSmall Offline
1
September 29, 2021 - 6:36 am
sp_Permalink sp_Print

I found this forum after a search led me to https://www.myonlinetraininghu.....le-reports. My end goal for this project is to create custom-named PDFs based on custom-formatted worksheets by category. 

I am concerned that I am not thinking about the data/design of my workbook and queries correctly/efficiently. I have been asked to use Excel to do it, rather than Access (which is where I am more comfortable/versed). I have been teaching myself Power Query and dabbling in Power Pivot and VBA, and am seeking some clarity from this community as to how best to leverage the various tools.

I have three reports that I merged in PQ (merged two then merged the third with the result). The result is multiple rows of detailed data with a code to group them with. 

I summed the rows based on the code and filtered for sums >0. This is the list of codes that need either one or two reports on the details that make up the sum.

I duplicated the sum query twice, and then filtered each for the categories of interest. This gave me the two detail queries that will provide data for my custom category worksheets.

I created a power pivot from the two detail queries, displaying the sums by category, and my idea was to somehow VBA loop through the items on the pivot table to 'call' the category worksheet and filter the data, then create the PDFs. I'm not sure this is possible? So I went another direction next...

My other idea for the PDFs was to load the detail queries to their worksheet, and then use a dynamic filter to create a dropdown to loop through with VBA. This is the method I think the above referenced article will tie into.

My questions:

The PD category sum is double what it should be...removed duplicates fixed but not sure why it was duplicated? (if you can see why that would be great…might be my understanding of the data that's the problem though as I'm new)

Is there a better way to get the queries I need that will be more efficient and faster (large data set so slow loading!)? (That will also address the doubling issue?!)

Is the second option for PDFs the best option or is there a better way entirely?

The customized worksheet views - how best to create them? It needs to be formatted/subtotalled etc very specifically. 

I have attached the sample workbook, sample data, and sample output reports. SAMPLE SDPD Workbook is the working file, others are raw data files used in Power Query.

Thanks in advance!

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1810
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
2
October 4, 2021 - 3:07 pm
sp_Permalink sp_Print

Hi Tanya,

The reason for duplicates is a filter applied in the source file. That FilterDatabase needs to be removed before reading data from sheets.1.jpgImage Enlarger

sp_PlupAttachments Attachments
  • sp_PlupImage 1.jpg (17 KB)
Avatar
Tanya McIlravy
Member
Members
Level 0
Forum Posts: 11
Member Since:
September 29, 2021
sp_UserOfflineSmall Offline
3
October 5, 2021 - 1:26 am
sp_Permalink sp_Print sp_EditHistory

Thank you. I didn't know to look for that, nor am I sure how it got there!

I don't know how to delete it (or them now as there are two in the master file I am working on.)  Can you guide me? Thanks.

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1810
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
4
October 5, 2021 - 3:56 am
sp_Permalink sp_Print

As mentioned, that is showing because there was a filter applied in that file.

Simply go to that power query step indicated in the previous message image, and apply a filter in the Name column, filter out FilterDatabase, just like you do in any normal table.

Avatar
Tanya McIlravy
Member
Members
Level 0
Forum Posts: 11
Member Since:
September 29, 2021
sp_UserOfflineSmall Offline
5
October 8, 2021 - 1:08 am
sp_Permalink sp_Print

Anyone have responses for my other questions? Thanks.

Is there a better way to get the queries I need that will be more efficient and faster (large data set so slow loading!)? (That will also address the doubling issue?!)

Is the second option for PDFs the best option or is there a better way entirely?

The customized worksheet views - how best to create them? It needs to be formatted/subtotalled etc very specifically. 

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Kim Knox, Nada Perovic
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
Jessica Stewart: 205
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Othman AL MUTAIRI
Misael Gutierrez Sr.
Attif Ihsan
Kieran Fee
Murat Hasanoglu
Brett Dryland
Saeed Aldousari
Bhuwan Devkota
Kathryn Patton
Maria Conatser
Forum Stats:
Groups: 3
Forums: 24
Topics: 6222
Posts: 27293

 

Member Stats:
Guest Posters: 49
Members: 31916
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.