cancel
Showing results for 
Search instead for 
Did you mean: 
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
Community Champion
Community Champion

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
Community Champion
Community Champion

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
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors