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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mandeeps19
New Member

Need Help in calculating distinct count using multiple conditions

Hi,

 

Need help in calculating distinct count of App where tickets status is approved but those should include only tickets where you have one Approved status.

 

so for example  if app A is have both approved status and inflight status it should not count but only count if it is Approved status

 

Approved statuses  - 

Approved


Approved With Exceptions
Conditionally Approved

 

and rest all in flight status

 

 

 

APPTicketStatus
AT-0001Discarded
AT-0002New Request
AT-0003Pending DA Review
BT-0004Rejected
BT-0005Approved
BT-0006Approved With Exceptions
BT-0007Conditionally Approved
CT-0008Pending E Review
DT-0009Pending Findings - D/APP TEAM
DT-0010A Scheduled
ET-0011Pending Findings – E
ET-0012C Scheduled
ET-0013E SCHEDULED
ET-0014Discarded
ET-0015New Request
ET-0016Pending DA Review
FT-0017Rejected
FT-0018Approved
FT-0019Approved With Exceptions
FT-0020Conditionally Approved
GT-0021Pending EA Review
GT-0022Pending Findings - D/APP TEAM
GT-0023A Scheduled
GT-0024Pending Findings – E
GT-0025C Scheduled
GT-0026E SCHEDULED
GT-0027Approved

@amitchandak 

2 REPLIES 2
Anonymous
Not applicable

Hi @mandeeps19 ,

 

I suggest you to try code as below to create a measure. I think the result should be 0.

Distinct Count APP only in Approved Status =
CALCULATE ( DISTINCTCOUNT ( 'Table'[APP] ) )
    - CALCULATE (
        DISTINCTCOUNT ( 'Table'[APP] ),
        FILTER (
            'Table',
            NOT ( 'Table'[Status] IN { "Approved With Exceptions", "Conditionally Approved" } )
        )
    )

Result is as below.

vrzhoumsft_0-1683184136357.png

Best Regards,
Rico Zhou

 

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

The result should be 4 as you can see A,C,D & E doesnt have the approved status

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.