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

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors