cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JYPARK Frequent Visitor
Frequent Visitor

Sum Group by type

Hi everyone,

 

Seeking for assistance.   I am trying to sum up the number of failure types.  However, I am not sure how I can do this.  

 

Failure.JPG

5 REPLIES 5
Super User
Super User

Re: Sum Group by type

You're just trying to count how many distinct item_failure_types you have? That's easy enough:

FailureTypes = DISTINCTCOUNT('Table 1'[item_failure_type])

  

Community Support Team
Community Support Team

Re: Sum Group by type

Hi @JYPARK ,

You could try the formula if you want to count the number of failure types based on item id.

Measure  = CALCULATE(DISTINCTCOUNT('Table '[failure types]),ALLEXCEPT('Table ','Table '[item id]))

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

JYPARK Frequent Visitor
Frequent Visitor

Re: Sum Group by type

I tried this method but when I select "New Column" and enter this 

FailureTypes = DISTINCTCOUNT('item_registration'[item_failure_type])
I get this error message:




Capture.JPG
Super User
Super User

Re: Sum Group by type

Don't try and create this as a new column.  Create it as a new measure.

sgsukumaran Member
Member

Re: Sum Group by type

@JYPARK   From your screenshots it appears that you are using direct query model. If so you cannot add columns at this time. You can only create measures. You are tryin to accomplish row context and the best way to do this is to add your logic to your model.

Helpful resources

Announcements
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

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: 163 members 1,466 guests
Please welcome our newest community members: