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
admin11
Memorable Member
Memorable Member

How to count number of row with no product info ?

Hi All

 

With the help from @v-yingjl i got the below expression working fine :-

  

flag no product offer yingil = 'CRM_TS'[Product Offer] = ""
 
Now i need count total how many row not fill with product offer by SBU.
 
I have try Below , i get error :-
CNT_NO_PROD_INFO = Distinctcount('CRM_TS'[Product Offer] = "")

admin11_0-1621506808851.png

Below link is my PBI file

https://www.dropbox.com/s/yjan8gv6l4263hw/PBT_V2021_400%20CRM_TS%201%20FILE%20ONLY_1.pbix?dl=0

 

Paul

1 ACCEPTED SOLUTION

Hello @admin11 

 

It seems to be like the data in the Product info column is not blank when we try with the previous formula. So for that, you have to create a new calculated column

 
ISBlank =
IF(ISBLANK('CRM_TS'[Product Offer]) || 'CRM_TS'[Product Offer] = "", true(), false())
 
Next, use the below formula for your card visualization:
 
CNT_NO_PROD_INFO =
CALCULATE(COUNTROWS(CRM_TS), FILTER(CRM_TS, [ISBlank] = True))
 
This is working on my side(refer to screenshot):
Community Answer2.PNG
 
And if you find the solution useful please mark my post as a solution!
In doing so, you are also helping me.
Thank you!
Mintu Baruah 

View solution in original post

4 REPLIES 4
MintuBaruah
Helper III
Helper III

Hello @admin11 

 

Looking at the data, you can calculate the blank rows in the Product offer column using the below formulae.

 

CNT_NO_PROD_INFO =
CALCULATE(COUNTROWS(CRM_TS), FILTER(CRM_TS, ISBLANK([Product Offer]) = TRUE()))
 
This will count total how many rows are not filled with product offers.
 
Regards,
Mintu Baruah

@MintuBaruah 

I have try to vreate both column and measure , but it display Blank.

admin11_0-1621512156372.png

 

Paul

Hello @admin11 

 

It seems to be like the data in the Product info column is not blank when we try with the previous formula. So for that, you have to create a new calculated column

 
ISBlank =
IF(ISBLANK('CRM_TS'[Product Offer]) || 'CRM_TS'[Product Offer] = "", true(), false())
 
Next, use the below formula for your card visualization:
 
CNT_NO_PROD_INFO =
CALCULATE(COUNTROWS(CRM_TS), FILTER(CRM_TS, [ISBlank] = True))
 
This is working on my side(refer to screenshot):
Community Answer2.PNG
 
And if you find the solution useful please mark my post as a solution!
In doing so, you are also helping me.
Thank you!
Mintu Baruah 

@MintuBaruah 

Thank you very much for your help. 

Paul

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.