Forum Discussion
Jess303
4 years agoFrequent Visitor
Creating a new column using distinct count based off of unique value of a different column
So I am new to the DAX world and this is giving me a headache. I have multiple rows of IDs and I need to count how many unique customers for each ID. Column three is what I would like to see in my ta...
- 4 years ago
This will do it without invoking CALCULATE, which can cause problems in a Calculated Column.
Customer Count = VAR varCurrentID = Records[ID] VAR varCustomerCount = COUNTROWS( DISTINCT( SELECTCOLUMNS( FILTER( Records, Records[ID] = varCurrentID ), "@Customers", Records[Customer] ) ) ) RETURN varCustomerCount
Anonymous
4 years agoNot applicable
I have a similar query, but the problem is that my data is spread across a given time period. So the query above is not helping.
This is what my data looks like:
I have unique user IDs, the number of sessions for that ID on a given date.
Now i want to create a basic line chart which can show the cumulative number of sessions per unique user.
Please help.