6 Replies Latest reply: Mar 23, 2017 6:08 AM by Zied Ahmed RSS

    Condition not working

    Zied Ahmed

      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