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.
Hola gente,
Tengo dos medidas para una tabla de fechas, pero para diferentes períodos:
Período contable (mm/21/aaaa a mm+1/20/aaaa)
Otros períodos
Ejemplo:
MonthAccount 8 (06/21/2020 a 07/20/2020)
MonthAccount 9 (07/21/2020 a 08/20/2020)
MonthAccount 10 (08/21/2020 a 09/20/2020)
Me gustaría hacer una medida que identifique el período de fecha que el usuario ha filtrado para elegir la medida adecuada.
Si el usuario: Filtrar fechas dentro del período contable (mm / 21/2020 a mm + 1/20/2020)
- medida 1
Más
- medida 2
En resumen: si el período filtrado solo tiene un valor para MonthAccount, elija la medida 1, si no la medida 2.
¿Es posible hacer eso?
Solved! Go to Solution.
Hola @XTF_2020 ,
Por favor, intente esto:
Measure =
VAR CountMonthAccount_ =
CALCULATE (
DISTINCTCOUNT ( 'Table'[MonthAccount] ),
FILTER (
'Table',
'Table'[Date] >= MIN ( 'Date'[Date] )
&& 'Table'[Date] <= MAX ( 'Date'[Date] )
)
)
RETURN
IF ( CountMonthAccount_ = 1, [Measure 1], [Measure 2] )
Measure 1 = 1
Measure 2 = 0
Hola @XTF_2020 ,
Por favor, intente esto:
Measure =
VAR CountMonthAccount_ =
CALCULATE (
DISTINCTCOUNT ( 'Table'[MonthAccount] ),
FILTER (
'Table',
'Table'[Date] >= MIN ( 'Date'[Date] )
&& 'Table'[Date] <= MAX ( 'Date'[Date] )
)
)
RETURN
IF ( CountMonthAccount_ = 1, [Measure 1], [Measure 2] )
Measure 1 = 1
Measure 2 = 0
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |