Forum Discussion
abhi1234
3 years agoRegular Visitor
trying to get count based on combinations
below is my sample data, I am trying to get a count based on feature combinations. desired result, based on user selected filters: User selects Fetr A Model 2023 Model 1 2 Model...
- 3 years ago
parry2k
3 years agoSuper User
abhi1234 you need to tweak your model a bit, and add another table, let's call it Model which will have all the unique values of the Model column. Set the relationship of this table with the transaction table on the model column. Add the following measure:
Model with Selected Features =
VAR __featuresSelected = COUNTROWS ( ALLSELECTED ( 'Table'[Feature] ) )
VAR __modelwithFeature = SUMMARIZE ( 'Table', 'Table'[Vin], "@Cnt", COUNT ( 'Table'[Feature] ) )
VAR __count = SUMX ( __modelwithFeature, INT ( [@Cnt] = __featuresSelected ) )
RETURN __count
To visualize, add Model column from the new table and above measure and that will give you the expected result.
👉 Learn Power BI and Fabric - subscribe to our YT channel - @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤️