Forum Discussion

Chipsahoy1's avatar
Chipsahoy1
Helper I
4 years ago

Table with Blank Rows

Hi Everyone,

 

Thank you in advance for your help.  I'm farily new to Powerbi and had a question.  

 

I have a table where I need to have the blank rows be filled in with the main service listed on the PO.  

 

In the example below, PO 1 has a blank row, but I need that row to show as "hip" for modality, "total" for subtype, and "advanced hip" for the construct.  PO 2's blank row should read knee, partial, and unicondylar.  PO 3's blank rows should read shoulder, total, and reverse shoulder.

 

Is there a DAX that can fill in the blank rows based off of the PO #?

   

POModalitySubtypeConstruct
1HipRevisionRevision
1HipTotalAdvanced Hip
1   
2KneePartialUnicondylar Knee
2KneeOtherUpcharge
2   
3ShoulderTotalReverse Shoulder
3   
3   

8 Replies

  • Hi Chipsahoy1 

     

    Can you tell us the logic behind the selected items for the blank rows? and can you share a sample result or how you want to use those data?

     

    Appreciate your Kudos!!

    • Chipsahoy1's avatar
      Chipsahoy1
      Helper I

      Hi VahidDM .  Thanks for your quick response.  The result I would like to get is below.  The reasoning is because these are the major/main items for that PO.  So for PO 1, the main item is listed on PO line #2.  For PO #2, the major item is on line 1 and for PO #3, the major item is on line 1.  

       

      The major items aren't always on PO line #s 1, 2, or 3.  They could be on line #10, or 5.  It all depends on who entered the info.  So unfortunately the major item's PO line # is random.

      POPO Line#ModalitySubtypeConstruct

      1

      1HipRevisionRevision
      12HipTotalAdvanced Hip
      13HipTotalAdvanced Hip
      21KneePartialUnicondylar Knee
      22KneeOtherUpcharge
      23KneePartialUnicondylar Knee
      31ShoulderTotalReverse Shoulder
      32Shoulder TotalReverse Shoulder
      33ShoulderTotalReverse Shoulder


      I'm open to suggestions on how this can be achieved. Would creating a separate table to only show the major components be an option (like below table)?

      PO Modality SubtypeConstruct
      1HipTotal

      Advanced Hip

      2KneePartial

      Unicondylar 

      3ShoulderTotal

      Reverse Shoulder 

      • VahidDM's avatar
        VahidDM
        Super User

        Hi Chipsahoy1 

         

        How can we find which PO line is the main? do you have any table like key table to find that?

         

        Appreciate your Kudos!!

         

         

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    This can be achived in power query If you are ok with that. Or you want to do it with dax only?

    • Chipsahoy1's avatar
      Chipsahoy1
      Helper I

      Anonymous I'm open to any possible solutions.  Can you show me what you mean?

  • Samarth_18's avatar
    Samarth_18
    Community Champion

    Hi Chipsahoy1 ,

     

    You can follow steps to get your desired output:-

    1. Go to trasform data tab, select your Modality,subtype and construct column and right click on it then select replace value option shown below:-

    2. Now put one space in "value to find" and add null in "Replace with"

    3. Now on the top ribbon click on "Fill" and select "Down"

    Below would be the final output and now click on close and apply:-

     

    Thank You,

    Samarth

  • VahidDM Samarth_18 Anonymous .  The end goal is to have a separate table where only the main components are listed (see below) based on PO # and not have any of the secondary components listed.

    PO #ModalitySubtypeConstruct
    1HipTotalAdvanced Hip
    2KneePartialUnicondylar Knee
    3Shoulder TotalReverse Shoulder
    4KneeRevisionRevision