Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.