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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to get value from one row of a column in another column and calculate the next values.

Hi all,

 

I have created 6 calculated columns to calculate the different values as shown in the picture(2), But the value of the column OB Book value(row second)should come from the last row value of the NB value column and likewise the third row value of OB Book value column should come from the Second row value of the NB Value, as shown in the picture(1) in excel. I am new To DAX, please anyone can help me, i am stuck on it since soo long, any help will be appreciated.

Thanks in advance!

 

 

 

 

 

Screenshot 2020-10-20 124128.png

(1)(1)

4 REPLIES 4
v-shex-msft
Community Support
Community Support

HI @Anonymous,

Power bi data model tables do not exist row/column index to work with the same logic as excel worksheet to accurately extract specific value. If you direct use aggregate functions on the calculated column, it should get the same results. (the aggregate applied to the whole list of column values) I think you need to add more conditions and filters to limited the calculated current category group.

In addition, I'd like to suggest you take a look at the following blog to know more about this difference:

Calculated Columns and Measures in DAX 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi @v-shex-msft 

 

Thanks for replying.!

Yes i tried aggregate functions but as you said it gets applied to whole column values, i am still trying how to make it bound to single row value.

Hi @Anonymous,

I'd like to suggest you take a look earlier functions which can use to extract the current row contents, it should help with your requirement.

DAX – The Correct Usage of EARLIER() 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

What have you tried already and what is not working?




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.