Replies: 2 comments
-
This is a good suggestion. I can see why it would be handy to quickly view the distinct values of a column. We will consider how best to implement this to take care of pagination (i.e. only fetching a relatively small number of values at once, and then dynamically fetching more as you scroll through the grid). As you discovered, TOPNSKIP is not viable, but we may be able to make do with two nested TOPNs. We'll do some testing to see how it performs. In the interim, a small script such as the following can be used to show a popup with the unique values (works in both TE2 and TE3). Save it as a column-level macro. // Construct the DAX expression to get all distinct column values, from the selected column:
var dax = string.Format("ALL({0})", Selected.Column.DaxObjectFullName);
// Evaluate the DAX expression against the connected model:
var result = EvaluateDax(dax);
// Output the DataTable containing the result of the DAX expression:
Output(result); |
Beta Was this translation helpful? Give feedback.
-
Hi @corycundy While not exactly the feature you requested here, I just wanted to inform you of the new ability in Tabular Editor 3.19.0 to execute partical code in a DAX Query, including executing a column reference - which will make a distinct over the selected column. See this linkedin post for a small demo: https://www.linkedin.com/feed/update/urn:li:activity:7272913843574427649 |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe
Finding an easy way to view the values of a column. The capability already exists for a table with the Table preview feature from the context menu of a Table in the TOM Explorer.
Describe the solution you'd like
Similar to how you can right click on a Table in the TOM and click Preview data, it would be nice to be able to do this on a column level. This can be handy to quickly determine the distinct values of a column. I would suggest using ALL to show the blank row if one exists. TOPNSKIP seems to have particular issues when not referencing a full physical table, but implementation is up to you. It would be nice for these to be sorted in alphabetical order.
Here is an article describing the potential issue: https://dax.tips/2019/05/14/topnskip-alternative/#:~:text=However%2C%20if%20you%20try%20using%20the%20function,given%20parameter%20combination.%20Please%20review%20MSDN%20documentation.
Goals
Background
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions