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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Thomasp75
Frequent Visitor

Row level calculation that adds rows

Hi everyone,

 

I am facing a new issue on my PBI. I have a table in the following format (rand = random number) :

 

monthproductvalue
decarand a
decbrand b
deccrand c
novarand a
novbrand b
novcrand c
octarand a
octbrand b
octc

rand c



What I want to do is create a new row for each month such as product = d, that will perform a calculation on the value when product = c (let's say 10 times the rand value when the product is c for a given month). So my outuput table should look something like that :

 

monthproductvalue
decarand a
decbrand b
deccrand c
decd10 * rand c
novarand a
novbrand b
novcrand c
novd10 * rand c
octarand a
octbrand b
octc

rand c

octd

10 * rand c

 

Would anyone know how I could perform that ? I need to keep my data in such format so that i can display it in my existing pivot table.

 

Thanks a lot for your help 🙂

Thomas

2 REPLIES 2
thumma
Frequent Visitor

Hi @Thomasp75 you can use the below dax to achieve the desire result.

Column = IF('Table'[product] = "d", CALCULATE(SUM('Table'[value]), 'Table'[product] = "c") * 10, 'Table'[value])

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

Thank you

Thank you. However, this is not exactly what I want. Product "d" doesn't exist at all in my first table, I want to create it 

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