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

Dax Calculation Group por, con condición de segmentación de fecha

Gurús

Tener un requisito. Este es el escenario. Necesidad de calcular la columna PCL utilizando la fórmula siguiente: (tabla base: Brrw):-

-------------------------------------------------------------------------------------

Fecha del informe (Slicer) (Este es un menú desplegable, elegido por el usuario)

dd-mon-yy <--- Campo : Brrw[ReportDate]

Industria LnAmt CrdAmt PCL

AGRICULTURA 10000 20000 ?

ganado 5000 10000 ? <-- Sub industria

Frutas y Verduras 5000 10000 ?

ACEITE Y GAS 20000 50000 ?

Exploración

Tuberías

-----------------------------------------------------------

1) Calcular SUM(LnAmt), SUM(CrdAmt) donde Brrw[ReportDate] > Report Date(Slicer) - 12 Group by Industry

2) PCL - SUM(LnAmt) / AVG(SUM(CrdAmt)) Grupo por Industria

Necesidad de tener los valores PCL para Industry y Sub Industry (ambos son jerarquías). La condición en el paso 1, no puedo obtener mi cabeza alrededor (valor de la cortadora, se puede asignar a una variable?). Cualquier idea bienvenida.

Gracias de antemano

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@scheri , Usted puede tener fórmula como

medida :
var _max á maxx(allselected(Date), Date[Date])
var _min á date(year(_max), month(_max)-12,day(_max))
devolución
calculate([measure], filter(Table, Table[Join Date]>-_min))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@scheri , Usted puede tener fórmula como

medida :
var _max á maxx(allselected(Date), Date[Date])
var _min á date(year(_max), month(_max)-12,day(_max))
devolución
calculate([measure], filter(Table, Table[Join Date]>-_min))

Anonymous
Not applicable

@amitchandak ¡¡Excelente!! Gracias por su tiempo. Funciona perfectamente. (La comunidad de Powerbi es simplemente increíble)

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.