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
bhmiller89
Helper V
Helper V

Calculated Measure

I have a table called "Contact Notes" that includes a column called "CreatedbyUserID" and "Note."

 

I need to calculate how many Notes were entered for each user (by ID).

 

I tried Note Count= CALCULATE(COUNTA(tblContactNotes'[Note]), tblContactNotes'[IsAuto]= 0, tblContactNotes'[IsSystem] = 0)

 

BUT  I need to calculate quantity of notes based on the person who entered them. Right now it's populating the total based on the client name, not the user who entered the note.

5 REPLIES 5
KHorseman
Community Champion
Community Champion

What do you mean it's populating the total based on the client name? Are you charting this measure against a client name column? It looks like it would work if you charted it with the CreatedbyUserID column.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I'm trying to replicate a spreadsheet that shows

 

Organization | Account Manager | TSM | Program Manager| #Notes by Account Manager| #Notes by TSM| #Notes by Program Manager

 

However, the measure I wrote just sums up all notes for the Organization and I don't know how to write multiple measures for each role

I still don't quite understand what you're asking for. Do you want to see a list of users with each of their total numbers of notes? If so, the measure you have written should work. You just have to plot it alongside the list of users. I assume that's the CreatedbyUserID column, but maybe you have another table of user names? That would have to be related to this notes table through the user ID.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




COL Notes = CALCULATE(COUNTA('dpmgr tblContactNotes'[Note]), 'dpmgr tblContactNotes'[IsSystem] = 0, 'dpmgr tblContactNotes'[IsAuto]= 0, USERELATIONSHIP('dpmgr tblContacts'[CustServiceRepID], 'dpmgr vwJMWebUsersSystemALL'[UserID]))

 

Is what I'm using. When I change the relationship to count them for the "TSM" I change The USERELATIONSHIP to map the TSMID to the UserID but Im' getting the same values for both 

It would probably help to see your table relationships.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.