Forum Discussion

CJC_DB's avatar
CJC_DB
Frequent Visitor
3 years ago
Solved

PowerBI - table auto filling

First of all I have to mentoine, that this project is my first PowerBi project.

 

I have uploaded some EXCEL tables into PowerBI. One table is containing various line which have the same part number, but the available information in the divfferent row varies.

picture: sample table

 

As you may see in the sample table the lines 2,3,4 have the same part number but with different information level in columns B,C.

In case of similar siuation i want that data will be automatically filled for all line with the same part number, in case one of the following following information is available in column B (G, Y or R). Otherwise no automatically filling should be applied and the row shall be left as in row 6.

The PowerBI filling funktion up/down is not retrieving the necessary result.

 

Thank you very much for your support!

 

  • CJC_DB , You can have a new column

     

    coalesce([Status], "B")

     

    or replace with one value

     

    or find a value and replace

     

    coalesce([Status], maxx(filter(Table, [Part no] = earlier([Part no]) ) , [Status])

     

     

  • Hi, CJC_DB 

     

    You can try the following methods.
    Column:

    Column = CALCULATE(MAX('Table'[Status]),FILTER('Table',[part no]=EARLIER('Table'[part no])))
    Column 1 = CALCULATE(MAX('Table'[Status.1]),FILTER('Table',[part no]=EARLIER('Table'[part no])))

    Are these 2 columns the output you expect?

     

    Best Regards,

    Community Support Team _Charlotte

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

4 Replies

  • CJC_DB , You can have a new column

     

    coalesce([Status], "B")

     

    or replace with one value

     

    or find a value and replace

     

    coalesce([Status], maxx(filter(Table, [Part no] = earlier([Part no]) ) , [Status])

     

     

    • CJC_DB's avatar
      CJC_DB
      Frequent Visitor

      amitchandak thank you for your reply.

      I am not sure whether I use the provided solutions correctly.

      Whatever function i am using i retrieve alsways the same result as displayed already in Column "B".

       

  • v-zhangti's avatar
    v-zhangti
    Icon for Community Support rankCommunity Support

    Hi, CJC_DB 

     

    You can try the following methods.
    Column:

    Column = CALCULATE(MAX('Table'[Status]),FILTER('Table',[part no]=EARLIER('Table'[part no])))
    Column 1 = CALCULATE(MAX('Table'[Status.1]),FILTER('Table',[part no]=EARLIER('Table'[part no])))

    Are these 2 columns the output you expect?

     

    Best Regards,

    Community Support Team _Charlotte

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

  • CJC_DB's avatar
    CJC_DB
    Frequent Visitor

    v-zhangti thank you very much for your support. Your proposal let to the expected result.

    amitchandak also to you thanks for the support