Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
MSch
New Member

Need Help with DAX Formula for ponderation measure

Hello,
I am currently stuck with this problem :

My set of data is a 'table1' such as :

[Name][Quantity][Price]
Name 1Quantity 1Price 1
Name 2Quantity 2Price 2


I created a Measure such as : 

Revenue = SUMX('table1','table1'[Price] * [Quantity] )

Now i want to create a table like this :
 
[Name][Revenue][Ponderation]
Name 1Revenue 1"Revenue1/Total Revenue"
Name 2Revenue 2"Revenue2/Total Revenue"

*the bold formula is to show you what i want in the values.

Well i have try to create another Measure that is equal to the ponderation of the line revenue / Total of all revenues of the column (showed as a %), that is where i am stuck, i have tryed this  :

 

Ponderation = sumx(
                                    SUMMARIZE( 'Table1', 'Table1'[Name] , "Revenue" , [Revenue] ) ,  [Revenue] )
                                    /
                                    CALCULATE(
                                                         sumx( SUMMARIZE( 'Table1', 'Table1'[Name],"Revenue",[Revenue]) , [Revenue] ) ,
                                                         ALLSELECTED('Table1'[Name])
                                  )

The result i have with this formula is :
100%
for every line and i can not find a solution to show the right result, can someone please light my candle?

Thanks in advance,

 

1 ACCEPTED SOLUTION

Hello Pat,
Thanks for you reply,
After inputing your solution the result of the measure still show 100% for each line like in the proposed formula, well i also see that if i just input the denominator part of your formula it returns the same as Revenue measure for each line instead of showing in every line the total of revenue. maybe the problem is elsewhere and i cannot find it ?

View solution in original post

5 REPLIES 5
mahoneypat
Microsoft Employee
Microsoft Employee

If you have other columns in that visual, include those in the All( ) too.

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Well after creating a new table with only 2 columns : [name] and [ponderation] the formula works, the problem is that in my dashboard table i have other columns which are calculated measure such as "revenue". And i can not precise them as arguments of ALL() function, so i am still stuck with my problem 😕

mahoneypat
Microsoft Employee
Microsoft Employee

Not stuck.  Just use ALL(Table) to remove all the filters from that table.  Or ALLSELECTED(Table) if you still want it to honor slicers on your report page.

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


mahoneypat
Microsoft Employee
Microsoft Employee

Please try a measure like this

 

Pct Revenue = DIVIDE([Revenue], CALCULATE([Revenue], ALL(Table[Name])))

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Hello Pat,
Thanks for you reply,
After inputing your solution the result of the measure still show 100% for each line like in the proposed formula, well i also see that if i just input the denominator part of your formula it returns the same as Revenue measure for each line instead of showing in every line the total of revenue. maybe the problem is elsewhere and i cannot find it ?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors