cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

New Member

## Getting the total of a measure as a constant

Hello!

I want the used the total of a measure as a constant for another measure, but have yet been unable to do this. Here's what I have:

I currently calculate GAP and (% ALL GRAD) - (% GRAD). However, what I want is to calculate GAP = (Total % WgtAVG; 4.39%) - % GRAD.

The masure for % WgtAVG =
RETURN
DIVIDE(
SUMX(
KEEPFILTERS(__CATEGORY_VALUES),
),
SUMX(
KEEPFILTERS(__CATEGORY_VALUES),
)
)

I have tried various SUMX's on this measure to no avail and used the totals under Quick Measure as well, but not luck.

Any help would be appreciated.

- - - Andrew

1 ACCEPTED SOLUTION
New Member

Sam,

Thanks for the idea. Unfortunately, I was unable to figure out how to apply that to get what I want, but did solve my problem another way.

I calculated the weigted average using:

% WgtAVG =
RETURN

Sumx(KEEPFILTERS(__CATEGORY_VALUES),

Then, I summed the % WgtAVG using:

I am still working through the logic of why these work, but they work under all the circumstances I need them.

- - - Andrew

2 REPLIES 2
Community Support

You may try the ALLSELECTED Function.

http://community.powerbi.com/t5/Desktop/Percentages-to-multi-line-report/m-p/378504#M172040

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
New Member

Sam,

Thanks for the idea. Unfortunately, I was unable to figure out how to apply that to get what I want, but did solve my problem another way.

I calculated the weigted average using:

% WgtAVG =
RETURN

Sumx(KEEPFILTERS(__CATEGORY_VALUES),

Then, I summed the % WgtAVG using:

I am still working through the logic of why these work, but they work under all the circumstances I need them.

- - - Andrew

Announcements

#### Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

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

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors