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
manalla
Helper V
Helper V

Average value of percentage at different dimension levels

Hi,

I have belwo scenairo where ValuePercentage_Calc field should show Avgerage value at ClientName level. Image show what i intend to do.

 

Data source is SSAS Tabular live connection. ValueOne and ValueTwo are also calculated measures at PBI desktop based on many other numeric fields.

ValuePercentage_Calc = CALCULATE(sum(TestTable[ValueOne])/sum(TestTable[ValueTwo]))

 

PBIQuestion.PNG

Thanks

Manoj

2 ACCEPTED SOLUTIONS
DataZoe
Employee
Employee

@manalla ,

 

Please try this:

 

ValuePercentage_Calc = averagex(values(TestTable[Project]),CALCULATE(sum(TestTable[ValueOne])/sum(TestTable[ValueTwo])))

 

edit: oops looks like the client name is the xyz, should be project level (proj 1, proj 2) in the above measure.

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

View solution in original post

amitchandak
Super User
Super User

@manalla , Try like

averageX(Summarize(Table,Table[client Name], Table[Project name],"_1",CALCULATE(sum(TestTable[ValueOne])/sum(TestTable[ValueTwo]))),[_1])

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@manalla , Try like

averageX(Summarize(Table,Table[client Name], Table[Project name],"_1",CALCULATE(sum(TestTable[ValueOne])/sum(TestTable[ValueTwo]))),[_1])

Hi @amitchandak 

 

Thanks for reply, in my case ValueOne and ValueTwo are already calculted columns based on more than 10 different calculations. So i am not able to use SUM(). How else can we achieve? As table has many other columns (dimension levels), can we include all level in Summarize?

 

Thanks

Manoj

DataZoe
Employee
Employee

@manalla ,

 

Please try this:

 

ValuePercentage_Calc = averagex(values(TestTable[Project]),CALCULATE(sum(TestTable[ValueOne])/sum(TestTable[ValueTwo])))

 

edit: oops looks like the client name is the xyz, should be project level (proj 1, proj 2) in the above measure.

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

@DataZoe , It worked on my dataset. Thank you!

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