Forum Discussion
Mente73
1 year agoFrequent Visitor
Countby price range
Hello, Can anyone help me out to count the number of purchases by price/amount range? I currently have a measure as follows: PurchaseCounts = CALCULATE(COUNT(Transactions[Amount]), ...
- 1 year ago
This approach uses a disconnected table named Segmentation:
Create measure:
Purchase Count Segmented = SUMX ( Segmentation, COUNTROWS ( FILTER ( Transactions, Transactions[Amount] > Segmentation[Range Min] && Transactions[Amount] <= Segmentation[Range Max] ) ) )Result:
You can specify the additional filters on Platform, TransactionType, and PaymentBy either in filters or adding them to the FILTER function. Specifying these as filters would enable the measure to be generic and thus reflect any user-specified filters.
Mente73
1 year agoFrequent Visitor
Thank you for your time and solution, worked as expected.