Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am trying to create a measure to count the number of distinct values of a field per day over a number of days.
Given a sample data set of
I am trying to create a measure that when looking at the 3 days will return a value of 5 based on customer (2+1+2)
I cannot use any calculations which will not work with RLS.
Solved! Go to Solution.
Due to the description of SUMX i dont think it can be used with row level security which will be added to the dataset later so the suggestion cannot be used.
This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.
I solved this be creating a merged colum of customer id and date to create a field i could do a distinct count on.
Hi @Coffeeaddict ,
Is your issue solved?Did @HotChilli 's suggestion help?
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Due to the description of SUMX i dont think it can be used with row level security which will be added to the dataset later so the suggestion cannot be used.
This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.
I solved this be creating a merged colum of customer id and date to create a field i could do a distinct count on.
Hi @Coffeeaddict ,
Great! Could you pls mark the reply as answered to close it?
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi,
Create a Calendar Table and build a relationship from the day column of your data table to the date column of your calendar table. Create a date slicer from your Calendar table and select any date range. Try this measure
=sumx(summarize(values(calendar[date]),calendar[date],"ABCD",distinctcount(data[customer])),[abcd])
Hope this helps.
Looks like a good case for a nested measure:
CDistinct = DISTINCTCOUNT(TableJJ[Customer])
Use the above like this:
MeasureQQ = SUMX(DISTINCT(TableJJ[day]), [CDistinct] )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |