Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

column split by delimiter value lightly different

 i have table with comma values column like 

Adjusted Density Factory OD
205.68.423PL04
212.41.623SA04
204.12.923DE04
204.30.723DE04
210423SA04
198.47.623PL04
204.30.723DE04
203.50.523FR04,FR05
206.5-0.523HR04

average value avg :77.111   now splited column comma value  by delimiter  like 

 

205.68.423PL04
212.41.623SA04
204.12.923DE04
204.30.723DE04
210423SA04
198.47.623PL04
204.30.723DE04
203.50.523FR04
203.50.523FR05
206.5-0.523HR04

this average lightly different  76.08 . any idea i am  only did splited by column  in to row . any idea .

  • Hi Anonymous ,

     

    If you want the average after splitting to be equal to the average before splitting, you need to add the index column, and then split the column, like this.

     

    The purpose is to divide the split rows into a group, and only calculate the data of one row when calculating the average value. Using the following formula to calculate the average will get the same result as before splitting the column.

     

    Measure = 
    DIVIDE(
        SUMX(
            SUMMARIZE( 'Table', 'Table'[Index], "One_Adjusted", MAX('Table'[Adjusted ]) ),
            [One_Adjusted]
        ),
        DISTINCTCOUNT('Table'[Index])
    )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

    Best Regards,
    Winniz

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

  • Anonymous's avatar
    Anonymous
    5 years ago

    its wokring . i have multiple value column so i want add index column for all  or else i can i use this index for all column .some column values still not matching 

3 Replies

  • you have one more row in your table after the split of FR04,FR05 into one row for FR04 and one for FR05.

     

    So however you calculate the average (not clear from your data) you're now dividing by 10 rather than 9.

  • v-kkf-msft's avatar
    v-kkf-msft
    Community Support

    Hi Anonymous ,

     

    If you want the average after splitting to be equal to the average before splitting, you need to add the index column, and then split the column, like this.

     

    The purpose is to divide the split rows into a group, and only calculate the data of one row when calculating the average value. Using the following formula to calculate the average will get the same result as before splitting the column.

     

    Measure = 
    DIVIDE(
        SUMX(
            SUMMARIZE( 'Table', 'Table'[Index], "One_Adjusted", MAX('Table'[Adjusted ]) ),
            [One_Adjusted]
        ),
        DISTINCTCOUNT('Table'[Index])
    )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

    Best Regards,
    Winniz

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      its wokring . i have multiple value column so i want add index column for all  or else i can i use this index for all column .some column values still not matching