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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Analitika
Post Prodigy
Post Prodigy

Move values from columns to row

I have Table1

I need lookup values from DokNr which is equal to ApNr and return sum from DebSum to CredSum

Expected result:

 

 

Analitika_0-1597304805386.png

 

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Analitika ,

 

You may create measure like DAX below.

 

CredSum= CALCULATE(Table1[DebSum],FILTER(ALLSELECTED(Table1), Table1[DokN] =MAX(Table1[ApNr])))

 

Best Regards,

Amy 

 

Community Support Team _ Amy

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

View solution in original post

4 REPLIES 4
v-xicai
Community Support
Community Support

Hi @Analitika ,

 

You may create measure like DAX below.

 

CredSum= CALCULATE(Table1[DebSum],FILTER(ALLSELECTED(Table1), Table1[DokN] =MAX(Table1[ApNr])))

 

Best Regards,

Amy 

 

Community Support Team _ Amy

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

amitchandak
Super User
Super User

@Analitika , Try a new column

sumx(filter(table, [AprNo] = earlier([DocNo])),earlier([debSum]))

 

or


sumx(filter(table, [AprNo] = earlier([DocNo])),([debSum]))

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

debSum is a measure not column

@Analitika ,Can you share sample data and sample output in table format?

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.