Forum Discussion
Dynamic OVER(PARTITION BY) DAX Equivalent
- Anonymous6 years ago
// Total number of visits [# Visits] = SUM( T[Visits Number] ) // Returns the bucket for the // total number of visits; // you might need to adjust the // limits in the disconnected // Buckets table (500 might not // be enough). [Visit Bucket] = var __visitCount = [# Visits] return CALCULATE( SELECTEDVALUE( Buckets[Bucket] ), Buckets[Min] <= __visitCount, __visitCount <= Buckets[Max], ALL( Buckets ) ) // For any slicing, it shows you // the number of customers that fall // into a selected bucket. [# Customers in Bucket] = var __currentBucket = SELECTEDVALUE( Buckets[Bucket] ) var __output = SUMX( VALUES( T[Customer ID] ), 1 * ( [Visit Bucket] = __currentBucket ) ) return if( __output > 0, __output )
Fowmy This works perfectly when a single customer id is selected but when all are selected it displays blank, rather than a count within each bucket
Anonymous
If you could share a set of sample data and the expected output then I will be able to help you out.
You can save your files in OneDrive, Google Drive, or any other cloud sharing platforms and share the link here.
____________________________________
How to paste sample data with your question?
How to get your questions answered quickly?
_____________________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply 🙂
- Anonymous6 years agoNot applicable
On the one you created, what result do you get if you select all brands, i.e. blue, green & orange; and select all channels.
Expected result should be 3 but for me it shows blank?