Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to duplicate rowa for to repeat the same information each month

Hallo Everyone,

 

I have this table 

 
 

 

I would like to have something like that but for 12 months of the year. 

 

 

 

Is there an easy way to do it directly in power BI Query or other ways?  

  • HI, Anonymous 

    Please try follow steps:
    1.duplicate a new table"Table(2)",then add following formula to the original query  to get a  cunstom function

     

    (Monthnumber as number)=>

     

     

     

    2. create a  blank query to generate a  list, then convert this list to table (using as new column of "Month")

     

    ={1..12}

     

     

     

    3.invoke custom function"Table(2)" 


    4. rename  column's name and expand table column you want

    The result will show as below:

    For more details,please check attached pbix file.

     

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

4 Replies

  • v-easonf-msft's avatar
    v-easonf-msft
    Icon for Community Support rankCommunity Support

    HI, Anonymous 

    Please try follow steps:
    1.duplicate a new table"Table(2)",then add following formula to the original query  to get a  cunstom function

     

    (Monthnumber as number)=>

     

     

     

    2. create a  blank query to generate a  list, then convert this list to table (using as new column of "Month")

     

    ={1..12}

     

     

     

    3.invoke custom function"Table(2)" 


    4. rename  column's name and expand table column you want

    The result will show as below:

    For more details,please check attached pbix file.

     

    Best Regards,
    Community Support Team _ Eason
    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

      The P column should have the same value as it is for the same reference. 

       

      But in case in was not possible to do it so. Could you please share with me the situation if P column was removed from the table?

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Anonymous , I am not sure what you asked in last update. But if you want data not to be grouped. Then add an index column suggested in last update and add that to matrix