+ Reply to Thread
Results 1 to 6 of 6

Resolved -- Power Query Question

  1. #1
    Registered User
    Join Date
    12-10-2021
    Location
    New Jersey
    MS-Off Ver
    365
    Posts
    7

    Question Resolved -- Power Query Question

    Good day,

    I hope I am posting this in the correct forum.

    I am working on a claim file. I have attached an example.

    Each claim number has multiple line numbers associated with it in a separate record on my spreadsheet. I have been able to use Power Query to sum all of the line numbers for each claim, with no problem.
    Here is the twist, I want to isolate those claims that have a particular line item. But I still need the total claim value including all the line items. In short, I know there is a problem with how this particular line item is adjudicated. Any claim without it is noise.

    If this is not the correct forum I apologize. I would appreciate being directed to the correct forum if possible.

    Thank you in advance for any assistance.
    Attached Files Attached Files
    Last edited by AndreaHazzard; 05-07-2022 at 12:37 PM. Reason: Resolved

  2. #2
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,039

    Re: Power Query Question

    Using formula:FILTER(Table1[[Claim Number]:[Amount paid]],Table1[Service]="Test Type 2")

    Using PQ, M code:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-10-2021
    Location
    New Jersey
    MS-Off Ver
    365
    Posts
    7

    Re: Power Query Question

    Thank you for your response but I may not have articulated myself well and I apologize. What you provided is very close.
    • If you look at the Total Claim Amount Tab, you can see that the Total Claim Amount column is the sum of all line items for the claim.
    • I want the same date in the Total Claim Amount field (the sum of all lines) but I want to include only those claims that have Test 2.
    • The solution provided returns the claim but only with the amount of the line item for Test 2 for the Total Claim Amount.


    I have uploaded the file with notes that I hope are clear
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: Power Query Question

    Requires two queries. See the attached file.

    1. Create query that determines which claim has Test Type 2
    2. Take original data and merge with Nr.1
    3. Group By the merged query and sum the results.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    12-10-2021
    Location
    New Jersey
    MS-Off Ver
    365
    Posts
    7

    Re: Power Query Question

    This is it. Thank you!

  6. #6
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,039

    Re: Resolved -- Power Query Question

    For Claim Number, formula=FILTER(Table1[Claim Number],Table1[Service]="Test Type 2")
    For Amount paid, formula=SUMIF(Table1[Claim Number],FILTER(Table1[Claim Number],Table1[Service]="Test Type 2"),Table1[Amount paid])

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] power query question
    By Mr. Hat in forum Excel General
    Replies: 10
    Last Post: 03-30-2022, 05:49 PM
  2. power query question
    By shj92922 in forum Excel General
    Replies: 2
    Last Post: 03-19-2022, 12:31 AM
  3. Power Query Import Question
    By Zandor435 in forum Excel General
    Replies: 1
    Last Post: 01-20-2020, 06:07 AM
  4. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  5. [SOLVED] Power Query - Filtering question
    By orhanceliloglu in forum Excel General
    Replies: 4
    Last Post: 12-05-2017, 04:37 AM
  6. Power query question
    By BORUCH in forum Excel General
    Replies: 13
    Last Post: 10-26-2017, 09:09 AM
  7. Power Query question
    By BamBamMoneyBags in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 11-08-2016, 02:43 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1