Reply
Regular Visitor
Posts: 19
Registered: ‎04-21-2017
Accepted Solution

Sum values based on distinct values on another column

Hello All,

I'm newby of using dax and especilly Power Bi. I'm trying to sum values based on distinct values on antoher column.

I have two columns "Description problems" and "Value". In the description problems column I have repeately description. I would like to count only description problems which are unique. Or in anoher words sum only the values in "values columns" which belong to unque description.  For example: I woud like to get total 5 at  the end based on the table bellow:

Description problemsValuesRepeat
A & C Phase line and load side stab to interconnecting bus connections for normal power on ATS switch.13
A & C Phase line and load side stab to interconnecting bus connections for normal power on ATS switch.1 
A & C Phase line and load side stab to interconnecting bus connections for normal power on ATS switch.1 
A (black) phase load & line side wire lug connection on feeder terminal block.12
A (black) phase load & line side wire lug connection on feeder terminal block.1 
A (black) phase load side wire lug connection on circuit breaker main for F-2.12
A (black) phase load side wire lug connection on circuit breaker main for F-2.1 
A Load side wire lug connection on 3  pole breaker #711
A phase #10 Line side screw connection between bus and breaker1 
A phase blade stab contacts and/or pivot bolt connection on disconnect switch.14
A phase blade stab contacts and/or pivot bolt connection on disconnect switch.1 
A phase blade stab contacts and/or pivot bolt connection on disconnect switch.1 
Total5 problems 

 

Woudl you please help me and give me some ideas, what is the correct measure syntaxt to sum up the values based on unique problem description? 

Br,


Accepted Solutions
Highlighted
Super Contributor
Posts: 1,315
Registered: ‎05-10-2016

Re: Sum values based on distinct values on another column

@Lilia

 

I would like to count only description problems which are unique.

 

DistinctProblems = DISTINCTCOUNT(Table1[Description problems])

 

 

View solution in original post


All Replies
Super Contributor
Posts: 1,315
Registered: ‎05-10-2016

Re: Sum values based on distinct values on another column

@Lilia

 

Hi, you can obtain this without using DAX.

 

DCount.gif

Regular Visitor
Posts: 19
Registered: ‎04-21-2017

Re: Sum values based on distinct values on another column

Hello Vvelarde, 

Thank you for your quick response. I know that method for counting distinct values, but I still need measure syntax. Because I would like to place card visualization with the total numbers and also I have a second visualization which is based on the total number that I will get. The second visualization needs show the total number of problems through the years.
Br,

 

 

 

Highlighted
Super Contributor
Posts: 1,315
Registered: ‎05-10-2016

Re: Sum values based on distinct values on another column

@Lilia

 

I would like to count only description problems which are unique.

 

DistinctProblems = DISTINCTCOUNT(Table1[Description problems])