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
Tengo la siguiente medida:
BS Act GC =
SWITCH (
VALUE ( CALCULATE ( MIN ( BalanceSheet[FxTypeNumber] ), ALL ( 'Calendar' ) ) ),
1, [BS Act GC MnthEnd],
2, [BS Act GC Historical]
)
donde otras dos medidas utilizadas en la anterior son:
BS Act GC MnthEnd =
DIVIDE ( [BS Act LC], [BS Rate EOM] )
Y
BS Act GC Historical =
CALCULATE (
SUMX (
BalanceSheet,
DIVIDE (
[BS Act LC],
IF (
ISBLANK (
LOOKUPVALUE (
'Exchange Rates'[Amount],
'Exchange Rates'[Month], BalanceSheet[Date],
'Exchange Rates'[Currency], BalanceSheet[BaseCurrency],
'Exchange Rates'[FX_Type], BalanceSheet[FxType]
)
),
1,
LOOKUPVALUE (
'Exchange Rates'[Amount],
'Exchange Rates'[Month], BalanceSheet[Date],
'Exchange Rates'[Currency], BalanceSheet[BaseCurrency],
'Exchange Rates'[FX_Type], BalanceSheet[FxType]
)
)
)
),
FILTER ( ALL ( 'Calendar' ), 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) )
)
Sin embargo, el total de la medida superior (BS Act GC) no
Normalmente utilizo summarize para solucionar problemas similares, pero no puedo averiguar cómo aplicarlo correctamente con SWITCH. Por favor, ayuda
Solved! Go to Solution.
Solucioné el problema usando esta medida en su lugar:
BS Act GC =
VAR BalanceSheetVirt =
ADDCOLUMNS (
CALCULATETABLE (
BalanceSheet,
FILTER ( ALL ( 'Calendar' ), 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) )
),
"Rate Month End",
LOOKUPVALUE (
'Exchange Rates'[Amount],
'Exchange Rates'[Currency], BalanceSheet[BaseCurrency],
'Exchange Rates'[Month], MAX ( 'Calendar'[MonthStartDate] ),
'Exchange Rates'[FX_Type], "Month End"
),
"Rate Historical",
LOOKUPVALUE (
'Exchange Rates'[Amount],
'Exchange Rates'[Currency], BalanceSheet[BaseCurrency],
'Exchange Rates'[Month], BalanceSheet[Date],
'Exchange Rates'[FX_Type], "Month End"
)
)
RETURN
SUMX (
BalanceSheetVirt,
IF (
VALUE ( BalanceSheet[FxTypeNumber] ) = 1,
[Amount_LC] / [Rate Month End],
[Amount_LC] / [Rate Historical]
)
)
Solucioné el problema usando esta medida en su lugar:
BS Act GC =
VAR BalanceSheetVirt =
ADDCOLUMNS (
CALCULATETABLE (
BalanceSheet,
FILTER ( ALL ( 'Calendar' ), 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) )
),
"Rate Month End",
LOOKUPVALUE (
'Exchange Rates'[Amount],
'Exchange Rates'[Currency], BalanceSheet[BaseCurrency],
'Exchange Rates'[Month], MAX ( 'Calendar'[MonthStartDate] ),
'Exchange Rates'[FX_Type], "Month End"
),
"Rate Historical",
LOOKUPVALUE (
'Exchange Rates'[Amount],
'Exchange Rates'[Currency], BalanceSheet[BaseCurrency],
'Exchange Rates'[Month], BalanceSheet[Date],
'Exchange Rates'[FX_Type], "Month End"
)
)
RETURN
SUMX (
BalanceSheetVirt,
IF (
VALUE ( BalanceSheet[FxTypeNumber] ) = 1,
[Amount_LC] / [Rate Month End],
[Amount_LC] / [Rate Historical]
)
)
No @Metricbits ,
¿Has intentado hacer un SUMX de la clase basado en isinscope?
¿Puede compartir datos de maqueta o una muestra de su archivo PBIX. Puede utilizar un onedrive, google drive, que transferimos o enlace similar para cargar sus archivos.
Si la información es confidencial, compártala a través de un mensaje privado.
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 |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |