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
Lilia
Helper I
Helper I

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,

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@Lilia

 

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

 

DistinctProblems = DISTINCTCOUNT(Table1[Description problems])

 

 




Lima - Peru

View solution in original post

3 REPLIES 3
Vvelarde
Community Champion
Community Champion

@Lilia

 

Hi, you can obtain this without using DAX.

 

DCount.gif




Lima - Peru

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,

 

 

 

Vvelarde
Community Champion
Community Champion

@Lilia

 

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

 

DistinctProblems = DISTINCTCOUNT(Table1[Description problems])

 

 




Lima - Peru

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.