- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Count Distinct Values of column in a Calculated Table Variable in DAX Measure
Hi. I have tables a and b. In my measure, I need to create a calculated table consisting of one column from table a (let's call it "ca") and another column from table b, "cb". now, within the measure, I need to do a distinct count on values from column cb in the calculated table.
Relationships:
Table b 1 ---- * Table b
Measure I tried:
Is there any way by which I can accomplish this? Please, note that I don't have the option of creating a physical table because I am working on a live connection to SSAS. Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

To make the question more generic, can I count the distinct values of a specific column in a calculated table variable in a dax measure? Please, note that the data source is analysis services, so the solution cannot involve creating an actual table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Ok. I used countx...it worked. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot).
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
12-20-2023 03:39 AM | |||
06-22-2023 05:25 AM | |||
Anonymous
| 03-27-2024 11:07 PM | ||
05-14-2023 12:53 PM | |||
03-12-2024 04:21 AM |
User | Count |
---|---|
141 | |
115 | |
84 | |
63 | |
48 |