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
juan_M_Estol
Regular Visitor

Problema con listar ultimos registros.

Buenas a todos, 

Tengo dos tablas, "Relevamientos" y "Ductos". 

juan_M_Estol_0-1639060981523.png

Necesito crear una tabla nueva resumen que me muestre el ultimo relevamiento de cada ducto.

juan_M_Estol_0-1639061558784.png

 

No logro hacerlo. Cualquier ayuda es bienvenida.

Muchas gracias.

 

1 ACCEPTED SOLUTION
v-yetao1-msft
Community Support
Community Support

Hi @juan_M_Estol 

I created a sample with your data .

(1)Create a relationship between two tables with field [Id_ducto]

Ailsamsft_0-1639468555814.png

(2)Add all the fields in a new table visual ,then create a measure to filter the max date for ducto .

 

Measure =
var _maxdate=CALCULATE(MAX(Relevamientos[fecha_Relevamiento]),ALLEXCEPT(Relevamientos,Relevamientos[Id_ducto],Ductos[nombre_ducto]))
return if(SELECTEDVALUE(Relevamientos[fecha_Relevamiento])=_maxdate,1,0)

 

(3)Then add the measure in visual filter to filter out the data whose value is 0, and only keep the data whose value is 1 .

Ailsamsft_1-1639468555815.png

Ailsamsft_2-1639468555816.png

I have attached my pbix file , you can refer to it .

 

Best Regard

Community Support Team _ Ailsa Tao

View solution in original post

2 REPLIES 2
v-yetao1-msft
Community Support
Community Support

Hi @juan_M_Estol 

I created a sample with your data .

(1)Create a relationship between two tables with field [Id_ducto]

Ailsamsft_0-1639468555814.png

(2)Add all the fields in a new table visual ,then create a measure to filter the max date for ducto .

 

Measure =
var _maxdate=CALCULATE(MAX(Relevamientos[fecha_Relevamiento]),ALLEXCEPT(Relevamientos,Relevamientos[Id_ducto],Ductos[nombre_ducto]))
return if(SELECTEDVALUE(Relevamientos[fecha_Relevamiento])=_maxdate,1,0)

 

(3)Then add the measure in visual filter to filter out the data whose value is 0, and only keep the data whose value is 1 .

Ailsamsft_1-1639468555815.png

Ailsamsft_2-1639468555816.png

I have attached my pbix file , you can refer to it .

 

Best Regard

Community Support Team _ Ailsa Tao

lbendlin
Super User
Super User

You don't need to join the tables in Power Query - you can do that in the Power BI data model.

The same is true for your filter requirement - that can be done in Power BI by selecting the MAX of fecha_ relevamiento for each nombre_ducto.

 

Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services.

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.