wrong values with customized header matrix

  • wrong values with customized header matrix

    Posted by DSC Communities on May 5, 2020 at 12:10 pm
    • Jawaher kh

      Member

      May 5, 2020 at 12:10 PM

      I use a custom calculated table for the headerĀ 

      Header =
      ADDCOLUMNS (
      UNION (
      DATATABLE (
      "Top", STRING,
      "Index1", INTEGER,
      "Middle", STRING,
      "Index2", INTEGER,
      "Bottom", STRING,
      "Index3", INTEGER,
      {
      { "Nombre product", 1, "", 0, "", 0 },
      { "Affaires nouvelles", 2, "Total", 8, "", 0 },
      { "Affaires nouvelles", 2, "%Total", 9, "", 0 }
      }
      ),
      SELECTCOLUMNS (
      SUMMARIZECOLUMNS ( Dim_Prod[dim5], Dim_Prod[dim6] ),
      "Top", "Affaires nouvelles",
      "Index1", 2,
      "Middle", Dim_Prod[dim5],
      "Index2", RANK.EQ ( Dim_Prod[dim5], Dim_Prod[dim5], ASC ),
      "Bottom", Dim_Prod[dim6],
      "Index3", RANK.EQ ( Dim_Prod[dim6], Dim_Prod[dim6] )
      )
      ),
      "Index0", 100 * [Index1] + 10 * [Index2] + [Index3]
      )

      ---------------------------------------------------------------
      OutputĀ 

       
      

      The measure DimensionMeasure is calculated within the following script:

      DimensionMeasure =

      VAR a = SELECTEDVALUE(Dim_DateFicheAgent[ID_DateFicheAgent])
      VAR b =SELECTEDVALUE(Dim_VieillissementAN[ID_Tranche])
      RETURN

      CALCULATE (
      COUNTROWS(Fact_AN)
      ;
      Fact_AN[Vitesse_Transf_Mois]<=b;
      DATESBETWEEN (
      Dim_DateFicheAgent[ID_DateFicheAgent];
      NEXTDAY ( SAMEPERIODLASTYEAR (LASTDATE ( Dim_DateFicheAgent[ID_DateFicheAgent] ) ) );
      LASTDATE ( Dim_DateFicheAgent[ID_DateFicheAgent] )

      )

      )

      the measure DimensionMeasure returns wrong values, it’s almost the same value for all middle in the matrix:

      How to correct it?

      ——————————
      Jawaher kh
      ——————————

    DSC Communities replied 5 years, 5 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘wrong values with customized header matrix’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!