Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have this condition and it works :
sum( {<[Month of date]= >}
if( Pays='Maroc',
aggr(
if (Only({<[Month of date]>}Code_Ligne)='MAR',
(
Count({<$(vSetPeriodRange),Code_Ligne={'MAR'}, [Month of date]=,Flag_Doublon={1}>}Dossier)
/2
)
+
Count({<$(vSetPeriodRange),Code_Ligne={'MAR'},[Month of date]=,Timeframe=,Flag_Doublon={0}>}Dossier)
,
Count({<$(vSetPeriodRange), [Month of date]=>}Dossier))
, Pays, [Month of date]),
aggr(Count({<$(vSetPeriodRange), [Month of date]=>}Dossier)
,Pays, [Month of date])
)
)
But when i want to delete the condition if( Pays='Maroc', it doesn't work :
sum( {<[Month of date]= >}
if (Only({<[Month of date]>}Code_Ligne)='MAR',
aggr(
(
Count({<$(vSetPeriodRange),Code_Ligne={'MAR'}, [Month of date]=,Flag_Doublon={1}>}Dossier)
/2
)
+
Count({<$(vSetPeriodRange),Code_Ligne={'MAR'},[Month of date]=,Timeframe=,Flag_Doublon={0}>}Dossier)
,
Count({<$(vSetPeriodRange), [Month of date]=>}Dossier)
, Pays, [Month of date]),
aggr(Count({<$(vSetPeriodRange), [Month of date]=>}Dossier)
,Pays, [Month of date])
)
)
Thank you
May be try this:
Sum({<[Month of date]=>}
Aggr(
If(Only({<[Month of date]>} Code_Ligne)='MAR',
(Count({<$(vSetPeriodRange),Code_Ligne={'MAR'}, [Month of date]=,Flag_Doublon={1}>}Dossier)/2) +
Count({<$(vSetPeriodRange),Code_Ligne={'MAR'},[Month of date]=,Timeframe=,Flag_Doublon={0}>}Dossier),
Count({<$(vSetPeriodRange), [Month of date]=>}Dossier)),
Pays, [Month of date]))
If you are removing the if condition, then remove the true or false condition also... try this
sum( {<[Month of date]= >}
if (Only({<[Month of date]>}Code_Ligne)='MAR',
aggr(
(
Count({<$(vSetPeriodRange),Code_Ligne={'MAR'}, [Month of date]=,Flag_Doublon={1}>}Dossier)
/2
)
+
Count({<$(vSetPeriodRange),Code_Ligne={'MAR'},[Month of date]=,Timeframe=,Flag_Doublon={0}>}Dossier)
,
Count({<$(vSetPeriodRange), [Month of date]=>}Dossier)
, Pays, [Month of date]),
aggr(Count({<$(vSetPeriodRange), [Month of date]=>}Dossier)
,Pays, [Month of date])
)
)
the problem is not solved yet when i remove
,
Count({<$(vSetPeriodRange), [Month of date]=>}Dossier)
May be try this:
Sum({<[Month of date]=>}
Aggr(
If(Only({<[Month of date]>} Code_Ligne)='MAR',
(Count({<$(vSetPeriodRange),Code_Ligne={'MAR'}, [Month of date]=,Flag_Doublon={1}>}Dossier)/2) +
Count({<$(vSetPeriodRange),Code_Ligne={'MAR'},[Month of date]=,Timeframe=,Flag_Doublon={0}>}Dossier),
Count({<$(vSetPeriodRange), [Month of date]=>}Dossier)),
Pays, [Month of date]))
Oh great ,problem resolved
Thank you Sunny
It worked?
Yes Sunny Thank you