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

Counting function in calculated column instead of measure

Hello There,

 

Is it possible to use 'CountDistinct' function or any alternate way to count number of unique entries in a calculated column.

I mean in 'New Column' instead of 'New Measure'

 

Thanks in Advance.

6 REPLIES 6
ianbarker Regular Visitor
Regular Visitor

Re: Counting function in calculated column instead of measure

Do you have an example of what you wish to acheive?

taumirza Member
Member

Re: Counting function in calculated column instead of measure

column = distinctcount(Dimcustomer[CustomerRank])

instead of

Measure = distinctcount(Dimcustomer[CustomerRank])

ianbarker Regular Visitor
Regular Visitor

Re: Counting function in calculated column instead of measure

I still don't follow why you would want to do that.

There's nothing to stop you doing it, but you'd end up with the same value against each record.

taumirza Member
Member

Re: Counting function in calculated column instead of measure

buddy actually i need total of the count column.

I have a calculation like 'Column/total count'

for this um trying to create a column with count and then its total as total count and then i will perform the above calculation.

um unable to create a calculation using both measure and column cus um in DirectQuery mode.

Is it clear now or u want me to elaborate it bit more..??

if it is clear then is there any better way to do that...!!

Highlighted
ianbarker Regular Visitor
Regular Visitor

Re: Counting function in calculated column instead of measure

Ah, ok... So your using Direct Query? In that case, I understand your issue. 

As you already know, you can't currently create a DAX measures in Power BI when using the Direct Query connection.

What is your data source? 

 

My personal opinion is, until the ability to add DAX in Direct Query becomes available, Direct Query shouldn't really be used unless your data source is a multi-dimensional or tabular cube.

If you're not using either of these, then unless somebody has an alternative suggestion, I'd look to not using Direct Query.

taumirza Member
Member

Re: Counting function in calculated column instead of measure

Hmmm K.

Thanks for your response @ianbarkerSmiley Happy

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 421 members 4,148 guests
Please welcome our newest community members: