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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
kldefens
Frequent Visitor

How do I create a measure to sum (total) up a distinct count?

Hi guys,

As you can see in the picture down below I created a table with different colums:

 

  • First column [VullingTotaalPerc] shows the percentage of version ID that are filled 100% and so on
  • Second column [Count of Versies.Id] shows the count (distinct) of the total version ID.
  • Third column [TotalVersiesIDCalculate] is a measure that I created that shows the count (distinct) of the total version ID but only for department X.
    Measure = TotalVersiesidCalculate = calculate(DISTINCTCOUNT(MKA[Versies.Id]),MKA[ProductieAfdeling]="COC2 en I&V")
  • Fourth column [DistinccountVersies.id-Calculated] is a measure that I created that show the count (distinct) of versies.ID.
    DistinccountVersies.id-Calculated = DISTINCTCOUNT(MKA[Versies.Id])
  • Fifth column [COC2-Calculated] is a measure that I created  -  [TotalVersiesIDCalculate] divided by [DistinccountVersies.id-Calculated] to show what the percentage is of the total amount.


The problem now is that when I use this formula: [TotalVersiesIDCalculate] / [DistinccountVersies.id-Calculated] the measure will divide 8 with 56 but what I want is that 8 will be divided by the total of 2533.

Can anyone help me out here?

Thnx!

kldefens_0-1670794047070.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@kldefens , Try like

 

Divide([TotalVersiesIDCalculate], calculate([DistinccountVersies.id-Calculated], allselected()) )

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@kldefens , Try like

 

Divide([TotalVersiesIDCalculate], calculate([DistinccountVersies.id-Calculated], allselected()) )

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 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.

Sept NL Carousel

Fabric Community Update - September 2024

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