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
FireFighter1017
Advocate II
Advocate II

Can't get a distinctcount of a text column unless I create a measure?

Hi,

Previously I would be able to put a text field in a table visual and ask for a distinct count or a simple count of values.

It seeems for some reason the developpers decided that we do not need this?

Because now the only way I can get this is by creating a measure, which is not necessarily efficient when you are exploring the data.

 

Here's what I get in Power BI Desktop:

FireFighter1017_0-1641485317788.png

There is no longer any options to add a calculation to this column.

In fact, I can't even put this text column into a values box of a clustered chart anymore.

 

But it seems to be still available in Power BI Service:

FireFighter1017_1-1641485386769.png

 

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @FireFighter1017 

By any chance does the Power BI dataset where you are seeing this behaviour contain at least one calculation group, or did it ever contain one?

 

Once at least one calculation group has ben added to a Power BI dataset, the Discourage Implict Measures setting is forced to true. This prevents creating implicit measures by choosing an aggregation type within the Values field well, so all measures must be written explicitly with DAX.

 

There is a good explanation of this feature in another post here. You can use Tabular Editor to see if Discourage Implicit Measures is set to true. If all calculation groups are removed, you can set it back to false.

 

As far as I can tell, this behaviour is consistent between Power BI Desktop and the Power BI Service, as long as the dataset in question has that setting enabled.

 

If that's not the issue, please post back, and would you be able to share a link to a santised PBIX?

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

3 REPLIES 3
FireFighter1017
Advocate II
Advocate II

**UPDATE**

It seems that by design, changing this property to 'ture' will display the aggregation options, but they would not be applied.

Well in my case, I don't have a calculation group but rather a calculation table.  And it seems that changing this setting to true not only displays the aggregation options but also applies it when selected.

FireFighter1017
Advocate II
Advocate II

Owen, you nailed it!

I checked two files in which one had a Measures table.

The one with 'Measures' table had this setting to 'True'.

I changed it back to 'False' and I could do calculation again on text fields.

 

I understand this may not be a good idea to keep it to 'False' so I will revert it back to 'True' after my exploration is done.

 

Thanks a lot good sir!

OwenAuger
Super User
Super User

Hi @FireFighter1017 

By any chance does the Power BI dataset where you are seeing this behaviour contain at least one calculation group, or did it ever contain one?

 

Once at least one calculation group has ben added to a Power BI dataset, the Discourage Implict Measures setting is forced to true. This prevents creating implicit measures by choosing an aggregation type within the Values field well, so all measures must be written explicitly with DAX.

 

There is a good explanation of this feature in another post here. You can use Tabular Editor to see if Discourage Implicit Measures is set to true. If all calculation groups are removed, you can set it back to false.

 

As far as I can tell, this behaviour is consistent between Power BI Desktop and the Power BI Service, as long as the dataset in question has that setting enabled.

 

If that's not the issue, please post back, and would you be able to share a link to a santised PBIX?

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

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.