cancel
Showing results for
Did you mean:
Highlighted Post Prodigy

## Having trouble with %Shared Formula with Measure

hi all , i wanna calculate the %Contribution in each year based on Business Type. in each year total %100

but what i have is Y_2021 which is calculated from Measure below  , and i use the Percentage of Grand Total  in BI , but shown 0% , it is wrong , which formula that i can use to acheive this ?

but when i use visualize "100% Stack Column Chart " in BI , it generates the result i wanted . But it is Column Chart , I want it to be on Line Chart.

Y_2021 = SWITCH(TRUE(),
'Final Measure'[Final Selection]="UC",[UC],
'Final Measure'[Final Selection]="\$NSR",[\$NSR],
'Final Measure'[Final Selection]="Total Transaction",[Total Transaction],
'Final Measure'[Final Selection]="\$NSR/UC",[\$NSR/UC],
'Final Measure'[Final Selection]="Total Industry NSR",[Total Industry NSR],
'Final Measure'[Final Selection]="UC Total Industry",[UC Total Industry],
BLANK()) 1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted Community Support

## Re: Having trouble with %Shared Formula with Measure

You may create measure like DAX below.

``````%Contribution =
DIVIDE (
CALCULATE (
[Y_2021],
FILTER (
ALLSELECTED ( Table1 ),
Table1[Year] = MAX ( Table1[Year] )
)
),
CALCULATE (
[Y_2021],
FILTER ( ALLSELECTED ( Table1 ), Table1[Year] = MAX ( Table1[Year] ) )
)
)
``````

Best Regards,

Amy

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 REPLIES 3
Highlighted Super User IX

## Re: Having trouble with %Shared Formula with Measure

@Chanleakna123 , try like the approach given in

Proud to be a Super User!

Highlighted Post Prodigy

## Re: Having trouble with %Shared Formula with Measure

hi , actually  i have acheived this , but the thing is when i continue doing another formula for %contribution , it doesn't work out

Highlighted Community Support

## Re: Having trouble with %Shared Formula with Measure

You may create measure like DAX below.

``````%Contribution =
DIVIDE (
CALCULATE (
[Y_2021],
FILTER (
ALLSELECTED ( Table1 ),
Table1[Year] = MAX ( Table1[Year] )
)
),
CALCULATE (
[Y_2021],
FILTER ( ALLSELECTED ( Table1 ), Table1[Year] = MAX ( Table1[Year] ) )
)
)
``````

Best Regards,

Amy

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements #### August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge! #### Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event. Top Solution Authors
Top Kudoed Authors
Users online (2,057)