Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
abhi1234
Regular 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
Model2023
Model 12
Model21
  
User selects Fetr A & B
Model2023
Model 12
Model 21
  
User selects Fetr A, B & C
Model2023
Model 11
Model 20

 

 

ModelFeatureVinDate
Model 1FetrAVIN18/12/2023
Model 1FetrBVIN18/12/2023
Model 1FetrCVIN18/12/2023
Model 1FetrDVIN18/12/2023
Model 1FetrAVIN28/12/2023
Model 1FetrBVIN28/12/2023
Model 1FetrCVIN38/11/2023
Model 1FetrDVIN38/11/2023
Model 2FetrAVIN48/10/2023
Model 2FetrBVIN48/10/2023
Model 2FetrCVIN58/10/2023
Model 2FetrDVIN58/10/2023
1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

feature.pbix

 

ThxAlot_0-1691883290404.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

Please find attached the PBI file.

Hope this helps.

Ashish_Mathur_0-1691891633387.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ThxAlot
Super User
Super User

feature.pbix

 

ThxAlot_0-1691883290404.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



Thank you! That does calculate combinations based on selected features... I am going to try to build on it to see if I can generate a forecast...

@ThxAlot great solution but unfortunaltey the total will never be correct, if that is not the requirement then it is a good solution. Well done! 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @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! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

I have not yet found any inconsistencies in the data I have validated, but I am still in the process of validating it. Could you please provide more information about why you believe the totals would be incorrect?

parry2k
Super User
Super 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! ❤️



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @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! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors