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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.