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
sieff1
New Member

Return a Value based on last Step(Column) Updated

I have 9 Steps each their own column with a date, I am trying to count each value in the column based on what step it is at. So I am trying to have it where if the last date inputted in the row is on step 8 it returns an 8 in a return column, or if its step 3 it returns a 3 in that column. I have tried doing SWITCH(TRUE([Step 9] >9, 9, [Step 8] = 8, 😎 But it only returns the single value in all the rows. Is there any way to do this with DAX or power query or even measures? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sieff1 

 

The Power bi isn't designed for calculations across rows.
Maybe you can try to use the Unpivote Columns in power query to transform row into columns:

Here I create a set of sample:

vzhengdxumsft_0-1711352938909.png

Click the Transform data in the home pane.

Then select all the columns and click the Unpivote Columns in transform pane:

vzhengdxumsft_1-1711353112770.png

The result is as follow:

vzhengdxumsft_2-1711353182764.png

That could be easier to get your outcome.

 

If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

 

Best Regards

Zhengdong Xu
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

2 REPLIES 2
Anonymous
Not applicable

Hi @sieff1 

 

The Power bi isn't designed for calculations across rows.
Maybe you can try to use the Unpivote Columns in power query to transform row into columns:

Here I create a set of sample:

vzhengdxumsft_0-1711352938909.png

Click the Transform data in the home pane.

Then select all the columns and click the Unpivote Columns in transform pane:

vzhengdxumsft_1-1711353112770.png

The result is as follow:

vzhengdxumsft_2-1711353182764.png

That could be easier to get your outcome.

 

If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

 

Best Regards

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

Wilson_
Super User
Super User

Hi sieff1,

 

Can you please share some actual data or a concrete example of what you're looking at?




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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