cancel
Showing results 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.

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!

1 ACCEPTED SOLUTION
Super User

@kldefens , Try like

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

Super User

@kldefens , Try like

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

Announcements

#### 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

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors