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
ThiagoDuarte
Helper I
Helper I

Calculated Column with previous report index

Hello there,

 

I need a help with a calculated column that returns the previous report index:

 

ThiagoDuarte_0-1621449433976.png

In this case the main_field represents a part that's going through processes. As it goes from one stage to another a new report is automatically generated using the id on rpc_id_nextreport (All this happens automatically and I have no access to modelling the SQL base).

 

Now, I need a calculated column that gives me the previous report index. I'm looking for this result:

 

ThiagoDuarte_1-1621449803264.png

 

rpc_id_previousreport = calculated column

 

Thanks

 

 

 

1 ACCEPTED SOLUTION

Thanks amitchandak but i worked my way around it.

 

I created a calculated table using summarize function to get the report id and the previous id in the same row then i created a relationship between the two tables.

 

It worked for me and it gives me such a faster response.

 

But thanks again

View solution in original post

3 REPLIES 3
v-janeyg-msft
Community Support
Community Support

Hi, @ThiagoDuarte 

 

You can easily create a calculated column to show the result.

Like this:

Column = LOOKUPVALUE('Table'[id],'Table'[id_nextreport],'Table'[id])

v-janeyg-msft_0-1621848333673.png

Best Regards

Janey Guo

 

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

@ThiagoDuarte , Create a new column like

 

new column =
var _1 =[rpc_id]
return
maxx(filter(Table, [rpc_next_report_id] =_1),[rpc_id])

Thanks amitchandak but i worked my way around it.

 

I created a calculated table using summarize function to get the report id and the previous id in the same row then i created a relationship between the two tables.

 

It worked for me and it gives me such a faster response.

 

But thanks again

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.