Forum Discussion
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 wantThe 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
Community 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 wantThe 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. - amitchandak
Super User
Anonymous , unless P have 4 different values. You will not get 4 rows. Matrix should able to disply this ?
You can add an index column in power bi and add that here
https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi
- AnonymousNot 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
Super 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