Difference between revisions of "Smart MdTable library"

(new library)
 
m
Line 1: Line 1:
Smart_MdTable library contains functions [[Smart_MdTable]] and Smart_MdTable_count. They are similar to the built-in function [[MdTable]], but they save you the effort of having to create a global index corresponding to each of the index columns in a relational table. Instead they return a multidimensional array with a local index corresponding to each index column, containing its unique values. Smart_MdTable_count applies to a relational table with no measure column(s) and returns a multidimensional array with a count of the number of rows in the table that match the coordinates of each cell in the result.  
+
Smart_MdTable library contains functions [[Smart_MdTable]]. They are similar to the built-in function [[MdTable]], but they save you the effort of having to create a global index corresponding to each of the index columns in a relational table. Instead they return a multidimensional array with a local index corresponding to each index column, containing its unique values.  
 +
 
 +
As with [[MdTable]], the default aggregation function «aggFn» is 'Sum'. If you set «aggFn» to 'Count', it assumes that the main table contains no measure (numerical) column and returns an array where each cell contains a count of the number of rows whose values match the coordinates of the call.  Or you can directly call the Smart_MdTable_count function in the library, which does the same thing.
  
 
Another difference between [[Smart_MdTable]] and [[MdTable]] is that the former has parameter «measureCols» that contains the measures (a subset of «cols» that contain numerical values), which don't have to be the last M columns of «cols», unlike the  «valueColumn» parameter of [[MdTable]].
 
Another difference between [[Smart_MdTable]] and [[MdTable]] is that the former has parameter «measureCols» that contains the measures (a subset of «cols» that contain numerical values), which don't have to be the last M columns of «cols», unlike the  «valueColumn» parameter of [[MdTable]].

Revision as of 02:17, 7 January 2022

Smart_MdTable library contains functions Smart_MdTable. They are similar to the built-in function MdTable, but they save you the effort of having to create a global index corresponding to each of the index columns in a relational table. Instead they return a multidimensional array with a local index corresponding to each index column, containing its unique values.

As with MdTable, the default aggregation function «aggFn» is 'Sum'. If you set «aggFn» to 'Count', it assumes that the main table contains no measure (numerical) column and returns an array where each cell contains a count of the number of rows whose values match the coordinates of the call. Or you can directly call the Smart_MdTable_count function in the library, which does the same thing.

Another difference between Smart_MdTable and MdTable is that the former has parameter «measureCols» that contains the measures (a subset of «cols» that contain numerical values), which don't have to be the last M columns of «cols», unlike the «valueColumn» parameter of MdTable.

Smart MDTable Lib diagram.png

Download the Smart_MdTable library from here:

Media:Smart_MdTable lib.ana

See also

Comments


You are not allowed to post comments.