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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to calculate Total distinct row with no blank

Hello all,

 

I have a table which has value on column PortalUserId (see image below). I need to calculate the total PortalUserID with status Active and  without the blank rows.

 

My current DAX formule is :

  1.  TotalActivePortalUser = CALCULATE([TotalPortalUserID], 'Fact user license New'[Status] = "Active"). 
  2. The TotalPortalUserId is also a measure, which is TotalPortalUserID = DISTINCTCOUNT('Fact user license New'[PortalUserID]).

 

 

When i use this measure TotalActivePortalUser  it will return 6 but the expected result for my measure must be 5.

 

Any suggestions??? Many thanks!

 

 

2018-05-04 12_21_22-user license.csv - Excel.png

1 ACCEPTED SOLUTION
msornakumar
Advocate III
Advocate III

Hi ,

 

 Can you please try the below formula


TotalActivePortalUser = CALCULATE([TotalPortalUserID], 'Fact user license New'[Status] = "Active" , NOT ISBLANK('Fact user license New'[PortalUserID]) )

 

Thanks

 

Sorna

View solution in original post

2 REPLIES 2
msornakumar
Advocate III
Advocate III

Hi ,

 

 Can you please try the below formula


TotalActivePortalUser = CALCULATE([TotalPortalUserID], 'Fact user license New'[Status] = "Active" , NOT ISBLANK('Fact user license New'[PortalUserID]) )

 

Thanks

 

Sorna

Anonymous
Not applicable

It works! thank you so much!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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