Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

adding custom column

suppose i fetch a month  column from database and have 4 row values .

t1.PNG

then i need to add a custom colum with 2 values needed to be repaeat for each rows above..so it will look like below.

t2.PNG

Is it possible?

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You need to create a table

generate(distinct(Table[Month/year]) ,

union( Row("Category", "Posted") ,Row("Category", "UnPosted")) )

 

or

 

crossjoin(distinct(Table[Month/year]) ,

union( Row("Category", "Posted") ,Row("Category", "UnPosted")) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , You need to create a table

generate(distinct(Table[Month/year]) ,

union( Row("Category", "Posted") ,Row("Category", "UnPosted")) )

 

or

 

crossjoin(distinct(Table[Month/year]) ,

union( Row("Category", "Posted") ,Row("Category", "UnPosted")) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
TheoC
Super User
Super User

Hi @Anonymous 

 

I'm sure there is various ways. One way would be to create two custom columns and then Unpivor them in Power Query.

 

If you use Transform Data to get to Power Query, you cN create a Custom Column and type "Posted" and click okay. Then add another Custom Column that uses "Unposted". Select both new columns and right click the  press Unpivot.  

 

Hope this helps. Theo

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors