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

Necesita ayuda con Dax - calcular (tirar) un valor basado en el agregado de fecha y hora máximo a ciertos campos

question1.JPG

Hola a todos, necesito ayuda para crear una medida para extraer el valor total del saldo de la mano agregado por almacén y número de artículo basado en la fecha máxima para ese día en particular con el tipo de transacción de filtro 10.

Debe dar valor 1547 para 7/27, 1576 para 7/28 y 1631 para 7/29 y así sucesivamente.

Por favor, hágamelo saber si necesita más información. Ver datos adjuntos

Almacénitem_numberstock_transaction_typetransaction_identitytotal_on_hand_balancetransaction_datetime
7002011510Wop15477/27/2020 7:37
7002011510Wop14387/27/2020 7:38
7002011510Wop16537/27/2020 7:38
7002011510Wop15767/28/2020 8:28
7002011531Oid16357/28/2020 15:06
7002011531Oid16177/28/2020 15:12
7002011510Wop16407/29/2020 7:19
7002011511Wom16317/29/2020 8:47
7002011531Oid15587/29/2020 10:34
7002011531Oid15407/29/2020 10:36
7002011531Oid15227/29/2020 15:23
3 REPLIES 3
amitchandak
Super User
Super User

@dhirendra59 , Tener columna de fecha e intentar

fecha: [transaction_datetime].fecha

new measure: calculate(lastnonblankvalue(table[transaction_datetime],min(table[total_on_hand_balance])),allexcept(Table,Table[warehouse],Table[item_number], Table[transaction_identity], Table[Date]), Table[stock_transaction_type]-10)

Muchas gracias @amitchandak

Greg_Deckler
Super User
Super User

@dhirendra59: parece un problema de agregación de medidas. Vea mi artículo de blog sobre eso aquí: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

El patrón es:
MinScoreMeasure ? MINX ( SUMMARIZE ( Tabla, Tabla[Grupo] , "Medida",[SuMeasure] ), [Medida])
MaxScoreMeasure ? MAXX ( SUMMARIZE ( Tabla, Tabla[Grupo] , "Medida",[SuMeasure] ), [Medida])
AvgScoreMeasure - AVERAGEX ( SUMMARIZE ( Tabla, Tabla[Grupo] , "Medida",[SuMeasure] ), [Medida])
etcetera.

O tal vez Buscar Min/Max: https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814?search-action-id=1...


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.