Forum Discussion
Count based on other measure count
Hello
I have a field i.e. Level-2 contains "Drawings, Paintings, Schema, Procedure, List). Each item should have 4 records. There will be multiple Item(ID) with level 2. Once item have 3 records and another omight have 4 records.
I am calculating count for each level as mentioned below for Drawings, It is working fine
- Anonymous3 years ago
Hi Avian65 ,
You can create a measure as below to get it, please find the details in the attachment.
Count of items where Drawing measure is 0 = CALCULATE ( DISTINCTCOUNT ( 'Merge1'[Id] ), FILTER ( 'Merge1', ISBLANK ( [Drawings] ) ) )If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
8 Replies
- Greg_DecklerCommunity Champion
Avian65 This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.- Avian65Helper I
Hello Greg,
Seems you misunderstood my post. There is no problem informula.
I am not doing any aggregration.
My suggestion please read email.
Avian
- AnonymousNot applicable
Hi Avian65 ,
You can create a measure as below to get it, please find the details in the attachment.
Count of items where Drawing measure is 0 = CALCULATE ( DISTINCTCOUNT ( 'Merge1'[Id] ), FILTER ( 'Merge1', ISBLANK ( [Drawings] ) ) )If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
- Avian65Helper I
I implemented your logic with my actual data, but it is not working as expected. Can you share some location where I can upload PowerReport ? Unfortunately I can not share it here.
- AnonymousNot applicable
Hi Avian65 ,
You can refer the following link to upload the file to the community, please grant me the proper permission to your shared file. Thank you.
How to upload PBI in Community
Best Regards