Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Creating Tables

Hello, I'm currently working on a project where I have to create/modify a table that I have to put down values where I have to substract using 2 values located in the same column. However I'm currently having difficulties on doing so is there a sollution/assistance for this problem? (Note: The table contains 22 rows in which row 1 and row 12 needs to be substracted, same applies for row 2 and 13, 3 and 14...)

 

Thank you so much for your time

7 Replies

  • hi Anonymous 

     

    Seems doable. could you paste some sample data?

  • Anonymous's avatar
    Anonymous
    Not applicable

     

    For example in this table a column needs to generated by substracting sample 1 in column 1 and sample 5 in column 1 which also applies for 2-6, 3-7 and 4-8. And another column needs to be generated with the same application but on column 2. 

     

       
     Column 1 Column 2
    Sample 153
    Sample 221
    Sample 313
    Sample 404
    Sample 548
    Sample 625
    Sample 712
    Sample 87

    1

    • Anonymous's avatar
      Anonymous
      Not applicable

      For some reason the values on the first column are so closely together with sample titles but the values for the first column are 5,2,1,0,4,2,1,7 respectively

    • FreemanZ's avatar
      FreemanZ
      Super User

      hi Anonymous 

       

      could you also paste the expected result column? for instance, where do you plan to put the subtraction result of sample 1 and 5?

      • Anonymous's avatar
        Anonymous
        Not applicable

        The result will be 

         Column 1Column 2
        Difference Between 1 and 51-5
        Difference Between 2 and 60-4
        Difference Between 3 and 702
        Difference Between 4 and 8-73
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    I have created a simple samplem please refer to my pbix file to see if it helps you.

    Create a measure.

    Measure = var _value=CALCULATE(MAX('table'[Column 1 ]),FILTER(ALL('table'),'table'[Index]=SELECTEDVALUE('table'[Index])+4))
    return 
    MAX('table'[Column 1 ])-_value

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Polly

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.