cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Count by Blank text

I am trying to count the number of hotels in "Hotel Names" that have blank "Descriptions" in the table below. My current measures keep on counting repeated names as additional hotels. Please help.

a1.png

4 REPLIES 4
amitchandak Super Contributor
Super Contributor

Re: Count by Blank text

Try

Blank = CALCULATE(DISTINCTCOUNTNOBLANK(Hotel[Hotel Name ]),not( ISBLANK(Hotel[Desc])))
msksenthil Regular Visitor
Regular Visitor

Re: Count by Blank text

You can try the below DAX

 

CALCULATE(DISTINCTCOUNT('Table (2)'[Hotel Nam]),FILTER('Table (2)','Table (2)'[Description] = ""))
Community Support Team
Community Support Team

Re: Count by Blank text

 Hi @acohen-ih-corp ,

 

If you want to calculate the amount that have empty description completely, such as following situation:

 

6.PNG

 

If you do not want to count C, you can use the following measure:

 

 

Count =
COUNTROWS (
    FILTER (
        ADDCOLUMNS (
            SELECTCOLUMNS ( DISTINCT ( 'Hotel'[Name] ), "n", [Name] ),
            "MaxLength", MAXX (
                FILTER (
                    ADDCOLUMNS ( 'Hotel', "DescriptionLength", LEN ( 'Hotel'[Description] ) ),
                    [DescriptionLength] = [n]
                ),
                [DescriptionLength]
            )
        ),
        [MaxLength] = 0
    )
)

 

 

 

 

BTW, pbix as attached.

 

Best regards,

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

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

Re: Count by Blank text

Hi @acohen-ih-corp ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?

 

Best regards,

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

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

Helpful resources

Announcements
New Ranks and Rank Icons in 2020

New Ranks and Rank Icons in 2020

Read the announcement for more information!

New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

November 2019 Community Highlights

November 2019 Community Highlights

Get an overview of the events and great community content from November.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)