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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Avian65
Helper I
Helper I

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 

 
Drawings = calculate (count(Merge1[Id]),Merge1[Items.Level-2]="Drawings")
 
Now I want to check which item are missing Level-2 and how many total items missing for each ID where does not have Drawings
 
Or how many items where Drawing measure is 0.
 
Please advise how can I do this?
 
Regards
Avian
1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

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] ) )
)

yingyinr_0-1669107309529.png

 

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
v-yiruan-msft
Community Support
Community Support

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] ) )
)

yingyinr_0-1669107309529.png

 

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I shared the file in your Prvate Message box and some queries also. Please check,

Hello YIng,

 

Did you got a chance to see my reports which I shared thru OneDrive?

 

Regards

Avian

Hello Ying.

 

As per above screen shot, I can not see the blank item in the list, infact I want to see only those items whoch are missing.

 

I message you in PM with url, please review.

 

Avian

Greg_Deckler
Super User
Super User

@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.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Hello Greg,

 

Seems you misunderstood my post. There is no problem informula.

 

I am not doing any aggregration.

 

My suggestion please read email.

 

Avian

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.