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
sammi1244
Frequent Visitor

'Beginner" Question? - how to allow for things such as a count on a non-value column?

All of my 'number' type columns show the sigma sign and allow me to do values, but for others that are not 'value' columns I still may want to do things like 'count'. In my image below, field #1 works fine; its a value field. Field #2 gives me a trouble; its seems it should let me drop it in the value area for limited calculation like 'count', even though its not a value. Do I really have to create a calcuated field for all of these types scenarios or am I missing a short cut?

Snag_1f4adbf7.png

1 ACCEPTED SOLUTION

Hi thanks. I could not get the elements to even drop in the value segment to get that far. I just started over, reimporting the data, and its all working now; so I am calling it a glitch :P.

thanks everyone! 

 

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

I always prefer and recommend users to write explicit measures

Count = distinctcount(Data[Patient Account Number])

This is a best practise.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Super User
Super User

@sammi1244 You should be able to drop that column into the Values field well and have default aggregations like First, Last, Count and Distinct Count available.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@sammi1244 , You can drop any column to visual in visualization pane, you can right-click and change aggregation/Summarization

 

or create  measures like

 

count(Table[patient Account Number])

Yes, that is what I thought, and I am pretty sure when I started playing in Power BI, I could use values, but this data set is giving me trouble. I tried to record a  video of what I mean but it will not allow me to post it here. Sousing screen shots (let me know if you need a shot of something not here to better analyze:

#1 When I select a non-value field, it drops to columns or rows by default.

Snag_1f96d1a5.png

#2 I try to drag the field to value and it will not allow me to; it grays out.

Snag_1f976a7a.png

#3 When I select a value field, it drops to columns or rows by default and will not allow me ot move it to value

Snag_1f99eaad.png

 #4 Just showing fields are set as values (I think these should work if anothing else, but they don't)

Snag_1f9b5895.png

 

Hi, @sammi1244 

Does @Greg_Deckler's solution not work for you?

39.png

You can also try to create a new measure to replace the value.

Measure = COUNT(Table1[Product])

40.png

Please check my sample file for more dtails.

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

 

Hi thanks. I could not get the elements to even drop in the value segment to get that far. I just started over, reimporting the data, and its all working now; so I am calling it a glitch :P.

thanks everyone! 

 

Helpful resources

Announcements
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.