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
kldefens
Frequent Visitor

How do I calculate an extra colomn of Percentage of Grand total with dax


Hello guys,

In the third colomn you can see the  % of GT, this is done by "show value as".

I want this in a measure so I could calculate some formulas.

 

The column "Total90%FilterCalculate" is created with this measure:

Total90%FilterCalculate = CALCULATE(DISTINCTCOUNT(MKA[Versies.Id]), FILTER(MKA, MKA[VullingTotaalPerc]="90 %"))


How do I create this measure?

Thnx!
kldefens_0-1670800827714.png

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

Hi   

try like:
Pct =
VAR _Total=
CALCULATE(
    DISTINCTCOUNT(MKA[Versies.Id]),
    ALL(MKA)
)
RETURN
FORMAT(DIVIDE([Total90%FilterCalculate], _Total), "0.0%")

@kldefens

View solution in original post

3 REPLIES 3
FreemanZ
Super User
Super User

Hi   

try like:
Pct =
VAR _Total=
CALCULATE(
    DISTINCTCOUNT(MKA[Versies.Id]),
    ALL(MKA)
)
RETURN
FORMAT(DIVIDE([Total90%FilterCalculate], _Total), "0.0%")

@kldefens

grandtotal
Resolver III
Resolver III

I've tried to do the same thing but I get an error. I don't know how to use the measure whenever I use distinccount + filter.

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.

Top Solution Authors