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
julesdude
Post Partisan
Post Partisan

Getting the total of a measure column in table as part of a percent calculation for another column

Hi,

I have a table visualisation in my report that contains 3 columns:

1. An asset reference

2. MEASURE: A monetary value column,

3. MEASURE: A conversion of value in column 2 to another currency

 

I would like a 4th column to show the % of value displayed in column 3 of the total of all values displayed in column 3.

 

I know that to do this I can use the DIVIDE(col3 / total of column 3). But how do I get the total value of column 3 if it is a measure column?

1 ACCEPTED SOLUTION

@julesdude ,

 

Try like , using the display column to summarize

 

Divide([Conversion Value], sumx(summarize(Allselected(Fact), Fact[Asset], Fact[Group], "_1",[Conversion Value] ) , [_1]) )

 

Assuming this is not working

 

 

Divide([Conversion Value], calculate([Conversion Value] ) , allselected() ) )

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@julesdude , Assume column 3 is measure 2

 

then you can have a measure

 

divide([Measure], calculate([Measure],allselected()) )

@amitchandak 

Unfortunately it did not work as I am getting 100% for each row item. It could be I'm not clear on your solution. Here are my column and measure names:

Asset    Group    Value [Measure]  

Conversion Value

[Measure]  

aaaA17630000005410964
bbbA18150000054059432
cccA11170000000  8297284
dddB28610000006105950
eeeB214900000098832582
fffB24340000003077796
gggB26100000004325934

Essentially I want the collection of assets for each Group to be considered so that I end up getting the following table:

Asset    Group    ValueConversion Value  Percent Weighting
aaaA176300000054109647.98%
bbbA1815000005405943279.77%
cccA11170000000829728412.24%
dddB286100000061059507.39%
eeeB2149000000988325825.44%
fffB2434000000307779687.97%
gggB261000000043259342.74%

 

 

@julesdude ,

 

Try like , using the display column to summarize

 

Divide([Conversion Value], sumx(summarize(Allselected(Fact), Fact[Asset], Fact[Group], "_1",[Conversion Value] ) , [_1]) )

 

Assuming this is not working

 

 

Divide([Conversion Value], calculate([Conversion Value] ) , allselected() ) )

Many thanks @amitchandak 

After a bit of adapting in your first example:

Divide([Conversion Value], sumx(summarize(Allselected(Fact), Fact[Asset], Fact[Group], "_1",[Conversion Value] ) , [_1]) )

....I was able to summarise as desired. Again many thanks for your help on this.

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