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 a todos
¿Hay alguien que pueda decirme si hay una diferencia real entre las dos siguientes declaraciones DAX?
Este me da valores duplicados en la columna RITypeGroup. es decir, FAC y QS
Este no me da duplicados (sólo FAC) que es lo que quiero.
Mi tabla de hechos se ve así: perfecto está de acuerdo con la salida visual.
Aquí está el SQL para la tabla:
Seleccione
RICLAIMSDEB. PolicyID, RICLAIMSDEB. ClaimID, RICLAIMSDEB. PeriodNo_SK, RICLAIMSDEB.CompanyID, RICLAIMSDEB. SystemID, RICLAIMSDEB. CurrencyID, RICLAIMSDEB. PolicyCurrencyID, RICLAIMSDEB. IndustryID,
RICLAIMSDEB. ProductTypeID, RICLAIMSDEB. FSBGroupingID, RICLAIMSDEB. PolicyClassID, RICLAIMSDEB. ProgramID, RICLAIMSDEB. InwardsRITypeID, RICLAIMSDEB. ClientPartyID, RICLAIMSDEB. BrokerPartyID, RICLAIMSDEB. MarketerID,
RICLAIMSDEB. BrokerMarketerID, RICLAIMSDEB. ParentPartyID, RICLAIMSDEB. DateOfLoss, RICLAIMSDEB. ClaimPaymentDate, RICLAIMSDEB. FinTimeID, RICLAIMSDEB. UWTimeID, RICLAIMSDEB. ClaimDateAdded, RICLAIMSDEB. ClaimLedgerDetails_Key,
RICLAIMSDEB. LedgerEntryTypeID, RICLAIMSDEB. LedgerEntrySubTypeID, RICLAIMSDEB. FinDocID, RICLAIMSDEB. DatePrinted, RICLAIMSDEB. ReportingClassID, RICLAIMSDEB. ReinsurerPartyID, RICLAIMSDEB. RIBrokerPartyID,
RICLAIMSDEB. RIArrangementID, RICLAIMSDEB. RITypeID, RICLAIMSDEB. ClaimEstTypeID, RICLAIMSDEB. RIGroupID, RICLAIMSDEB. TransactionType, RICLAIMSDEB. RITypeGroup,
sum([AmountInclVAT]) AS AmountInclVAT,
sum([AmountExclVAT]) AS AmountExclVAT,
importe([IVA]) COMO IVA
DESDE (
Seleccione
FCRIP. PolicyID AS PolicyID,
FCRIP. ClaimID AS ClaimID,
FCRIP. PeriodNo_SK COMO PeriodNo_SK,
FCRIP.CompanyID AS CompanyID,
FCRIP. SystemID AS SystemID,
FCRIP. CurrencyID AS CurrencyID,
0 AS PolicyCurrencyID,
FCRIP. IndustryID AS IndustryID,
FCRIP. ProductTypeID AS ProductTypeID,
FCRIP. FSBGroupingID AS FSBGroupingID,
FCRIP. PolicyClassID AS PolicyClassID,
FCRIP. ProgramID AS ProgramID,
FCRIP. InwardsRITypeID AS InwardsRITypeID,
FCRIP. ClientPartyID AS ClientPartyID,
FCRIP. BrokerPartyID AS BrokerPartyID,
FCRIP. MarketerID AS MarketerID,
FCRIP. BrokerMarketerID AS BrokerMarketerID,
FCRIP. ParentPartyID AS ParentPartyID,
FCRIP. DateOfLoss AS DateOfLoss,
FCRIP. ClaimPaymentDate AS ClaimPaymentDate,
0 COMO RIClaimRecoveryDate, --CHECK--
FCRIP. FinTimeID AS FinTimeID,
FCRIP. UWTimeID AS UWTimeID,
FCRIP. ClaimDateAdded AS ClaimDateAdded,
--0 COMO ClaimLedgerID,
FCRIP. ClaimLedgerDetails_Key COMO ClaimLedgerDetails_Key,
FCRIP. LedgerEntryTypeID AS LedgerEntryTypeID,
FCRIP. LedgerEntrySubTypeID AS LedgerEntrySubTypeID,
--0 COMO RIPaymentLedgerID,
FCRIP. FinDocID AS FinDocID,
0 COMO DatePrinted, --CHECK--
FCRIP. ReportingClassID AS ReportingClassID,
FCRIP. ReinsurerPartyID AS ReinsurerPartyID,
FCRIP. RIBrokerPartyID AS RIBrokerPartyID,
FCRIP. RIArrangementID AS RIArrangementID,
FCRIP. RITypeID AS RITypeID,
CASO CUANDO FCRIP. RITypeID IN (1, 11) Y LUEGO 'QS' CUANDO FCRIP. RITypeID IN (3, 4) Y LUEGO 'FAC' CUANDO FCRIP. RITypeID IN (2) THEN 'SP' WHEN FCRIP. RITypeID IN (7) THEN 'XOL' ELSE 'Unknown' END AS 'RITypeGroup',
FCRIP. ClaimEstTypeID AS ClaimEstTypeID,
--FCRIP. ClaimRILegID AS ClaimRILegID,
FCRIP. RIGroupID AS RIGroupID,
'Recoverable' COMO TransactionType,
sum((FCRIP. AmountPaid)+(FCRIP. IVA Pagado)) AS AmountInclVAT,
suma (FCRIP. AmountPaid) AS AmountExclVAT,
suma (FCRIP. IVA Pagado) COMO IVA
DE FactClaimsRIPaid FCRIP
GRUPO POR FCRIP. PolicyID, FCRIP. ClaimID, FCRIP. PeriodNo_SK, FCRIP.CompanyID, FCRIP. SystemID, FCRIP. CurrencyID, FCRIP. IndustryID, FCRIP. ProductTypeID, FCRIP. FSBGroupingID, FCRIP. PolicyClassID, FCRIP. ProgramID, FCRIP. InwardsRITypeID,
FCRIP. ClientPartyID, FCRIP. BrokerPartyID, FCRIP. MarketerID, FCRIP. BrokerMarketerID, FCRIP. ParentPartyID, FCRIP. DateOfLoss, FCRIP. ClaimPaymentDate, FCRIP. FinTimeID, FCRIP. UWTimeID, FCRIP. ClaimDateAdded, FCRIP. ClaimLedgerDetails_Key,
FCRIP. LedgerEntryTypeID, FCRIP. LedgerEntrySubTypeID, FCRIP. FinDocID, FCRIP. ReportingClassID, FCRIP. ReinsurerPartyID, FCRIP. RIBrokerPartyID, FCRIP. RIArrangementID, FCRIP. RITypeID, FCRIP. ClaimEstTypeID, FCRIP. RIGroupID
UNION ALL
Seleccione
LA FRICA. PolicyID AS PolicyID,
LA FRICA. ClaimID AS ClaimID,
LA FRICA. PeriodNo_SK COMO PeriodNo_SK,
FRICR.CompanyID AS CompanyID,
LA FRICA. SystemID AS SystemID,
0 AS CurrencyID,
LA FRICA. PolicyCurrencyID AS PolicyCurrencyID,
0 AS IndustryID,
LA FRICA. ProductTypeID AS ProductTypeID,
0 AS FSBGroupingID,
LA FRICA. PolicyClassID AS PolicyClassID,
0 AS ProgramID,
LA FRICA. InwardsRITypeID AS InwardsRITypeID,
LA FRICA. ClientPartyID AS ClientPartyID,
LA FRICA. BrokerPartyID AS BrokerPartyID,
LA FRICA. MarketerID AS MarketerID,
0 AS BrokerMarketerID,
0 AS ParentPartyID,
LA FRICA. DateOfLoss AS DateOfLoss,
0 COMO ClaimPaymentDate,
LA FRICA. RIClaimRecoveryDate AS RIClaimRecoveryDate,--CHECK--
LA FRICA. FinTimeID AS FinTimeID,
LA FRICA. UWTimeID AS UWTimeID,
LA FRICA. ClaimDateAdded AS ClaimDateAdded,
--FRICR. ClaimLedgerID AS ClaimLedgerID,
0 COMO ClaimLedgerDetails_Key, --CHECK--
LA FRICA. LedgerEntryTypeID AS LedgerEntryTypeID,
LA FRICA. LedgerEntrySubTypeID AS LedgerEntrySubTypeID,
--FRICR. RIPaymentLedgerID AS RIPaymentLedgerID,
0 AS FinDocID,
LA FRICA. DatePrinted AS DatePrinted,
0 como ReportingClassID,
LA FRICA. ReinsurerPartyID AS ReinsurerPartyID,
LA FRICA. RIBrokerPartyID AS RIBrokerPartyID,
LA FRICA. RIArrangementID AS RIArrangementID,
LA FRICA. RITypeID AS RITypeID,
CASO CUANDO FRICR. RITypeID IN (1, 11) Y LUEGO 'QS' CUANDO FRICR. RITypeID IN (3, 4) Y LUEGO 'FAC' CUANDO FRICR. RITypeID IN (2) LUEGO 'SP' CUANDO FRICR. RITypeID IN (7) THEN 'XOL' ELSE 'Unknown' END AS 'RITypeGroup',
0 AS ClaimEstTypeID,
--0 COMO ClaimRILegID,
0 COMO RIGroupID,
'Recuperado' COMO TransactionType,
sum((FRICR. RIClaimRecoveryAmount)+(FRICR. RIClaimRecoveryVATAmount)) AS AmountInclVAT,
suma (FRICR. RIClaimRecoveryAmount) AS AmountExclVAT,
suma (FRICR. RIClaimRecoveryVATAmount) COMO IVA
DE FactRIClaimsRecutado FRICR
GRUPO POR FRICR. PolicyID, FRICR. ClaimID, FRICR. PeriodNo_SK, FRICR.CompanyID, FRICR. SystemID, FRICR. PolicyCurrencyID, FRICR. ProductTypeID, FRICR. PolicyClassID, FRICR. InwardsRITypeID,
LA FRICA. ClientPartyID, FRICR. BrokerPartyID, FRICR. MarketerID, FRICR. DateOfLoss, FRICR. RIClaimRecoveryDate, FRICR. FinTimeID, FRICR. UWTimeID, FRICR. ClaimDateAdded,
LA FRICA. LedgerEntryTypeID, FRICR. LedgerEntrySubTypeID, FRICR. DatePrinted, FRICR. ReinsurerPartyID, FRICR. RIBrokerPartyID, FRICR. RIArrangementID, FRICR. RITypeID
) RICLAIMSDEB
GRUPO POR RICLAIMSDEB. PolicyID, RICLAIMSDEB. ClaimID, RICLAIMSDEB. PeriodNo_SK, RICLAIMSDEB.CompanyID, RICLAIMSDEB. SystemID, RICLAIMSDEB. CurrencyID, RICLAIMSDEB. PolicyCurrencyID, RICLAIMSDEB. IndustryID,
RICLAIMSDEB. ProductTypeID, RICLAIMSDEB. FSBGroupingID, RICLAIMSDEB. PolicyClassID, RICLAIMSDEB. ProgramID, RICLAIMSDEB. InwardsRITypeID, RICLAIMSDEB. ClientPartyID, RICLAIMSDEB. BrokerPartyID, RICLAIMSDEB. MarketerID,
RICLAIMSDEB. BrokerMarketerID, RICLAIMSDEB. ParentPartyID, RICLAIMSDEB. DateOfLoss, RICLAIMSDEB. ClaimPaymentDate, RICLAIMSDEB. FinTimeID, RICLAIMSDEB. UWTimeID, RICLAIMSDEB. ClaimDateAdded, RICLAIMSDEB. ClaimLedgerDetails_Key,
RICLAIMSDEB. LedgerEntryTypeID, RICLAIMSDEB. LedgerEntrySubTypeID, RICLAIMSDEB. FinDocID, RICLAIMSDEB. DatePrinted, RICLAIMSDEB. ReportingClassID, RICLAIMSDEB. ReinsurerPartyID, RICLAIMSDEB. RIBrokerPartyID,
RICLAIMSDEB. RIArrangementID, RICLAIMSDEB. RITypeID, RICLAIMSDEB. ClaimEstTypeID, RICLAIMSDEB. RIGroupID, RICLAIMSDEB. TransactionType, RICLAIMSDEB. RITypeGroup
Solved! Go to Solution.
@nikilouwgmail , consulte : http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/
@nikilouwgmail , consulte : http://dataap.org/blog/2019/04/22/difference-between-calculate-with-and-without-filter-expression/
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 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
1 | |
1 |