cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

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
Community Support
Community Support

HI @deekshasingh,

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.

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.

What have you tried already and what is not working?




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

Proud to be a Super User!




Hi @deekshasingh,

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.

Helpful resources

Announcements
November Update

Check it Out!

Click here to read more about the November 2020 Updates!

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform October Community Highlights

Check out the top community contributors across all of the communities

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors