This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Tabular Editor C# script to preview data for selected tables, columns and measures. Written by Ruben Van de Voorde, adapted from the original PreviewColumnsAndMeasures.csx by Kurt Buhler (https://gist.github.com/data-goblin/6ff37760cb35b793801c19a6a0ad73b0). | |
| // * For >=1 tables, return row count per table | |
| // * For >=1 columns from the same table, return distinct values and row count per combination | |
| // * For >=1 measures, return the evaluated result per measure | |
| // * For any combination of columns & measures, return distinct values per column combination and evaluated result | |
| // Instructions | |
| // ------------ | |
| // 1. Save this script as a macro with a context of 'Table', 'Column' and 'Measure' | |
| // 2. Configure a keyboard shortcut for the macro if using Tabular Editor 3 |