Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Count rows for complete columns

Hello, 

 

I have an issue. I try to count rows but I don't know how. 

I need to take into account too following stuffs: 

Each row has to filled 3 columns: 

  • asset name 
  • asset status 
  • asset class (yellow columns)

or this 3 columns: 

  • name 
  • fqdn 
  • IP (green columns)

I can only count values if I have complete values at first in columns: asset name, asset status, asset class and if I don't have values in this 3 columns I take into account this 3 columns: name, fqdn, IP. 

For above example result should = 19 rows because at first I count values if 3 columns (asset name, asset status, asset class) are complete and if I have blank values for this 3 columns  (asset name, asset status, asset class) I should count values for 3 complete columns:  name, fqdn, IP and then all add. 

I have no idea how to do this, can you help me? 

 

 

 

  • rsbin's avatar
    rsbin
    3 years ago

    Anonymous ,

    Have attached a pbix file for you to refer.

    My approach was to create several columns to test  your Yellow and Green columns.

    Then finally add up the columns that match your conditions. 

    Made use of the AND function.  But this only accepts two arguments, so had to "nest" them to account for each set of 3 columns.

    Hopefully will be clear when you review the file.

    Any questions, please ask, but I will be signing off shortly.  Can revisit tomorrow if need be.

    Good Luck and Regards,

3 Replies

  • rsbin's avatar
    rsbin
    Community Champion

    Anonymous ,

    I think I have a solution for you.  But please post the above data as a table not as an image.

    Then I can work with it more easily and give you some suggestions.

    Regards,

    • Anonymous's avatar
      Anonymous
      Not applicable

      rsbin of course, thanks a lot for your help! 

       

      ProductAsset NameAsset Status Asset ClassName FQDNIP
      P1A1Ready C1   
      P1A2Ready C1   
      P1A3Ready C1   
      P2A4Ready C1   
      P2A5Ready C1   
      P2A6OperationalC2   
      P3A7OperationalC3   
      P4A8Ready C4   
      P4A9Ready C4   
      P4A10Ready C4   
      P4A11Ready C4   
      P5A12Ready C5   
      P5A13Ready C5A13T11
      P5A14Ready C5A14T22
      P5A15Ready C5A15T33
      P6   A15T34
      P6   A17T35
      P7   A18T46
      P7   A19T47
      P7      
      • rsbin's avatar
        rsbin
        Community Champion

        Anonymous ,

        Have attached a pbix file for you to refer.

        My approach was to create several columns to test  your Yellow and Green columns.

        Then finally add up the columns that match your conditions. 

        Made use of the AND function.  But this only accepts two arguments, so had to "nest" them to account for each set of 3 columns.

        Hopefully will be clear when you review the file.

        Any questions, please ask, but I will be signing off shortly.  Can revisit tomorrow if need be.

        Good Luck and Regards,