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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
surajbh
Helper I
Helper I

Create a measure to show average on % in the Matix visual

 JanuarJanuarFebFebMarchMarchAprilAprilAvergageAvergage
 speedVelocityspeedVelocityspeedVelocityspeedVelocityspeedVelocity
Truck 1 71%69%75%78%42%48%87%78%  
Truck 2 78%15%14%46%71%69%75%87%  
Truck 3 77%68%42%65%68%78%45%52%  
Truck 4 71%69%78%72%89%69%85%79%  

 

I would like to calculate the average speed and velocity and display them at the end of the table, as shown above. I am curious if there is a way to show the average as a percentage of the months displayed in the table. Any guidance on how to achieve this would be greatly appreciated. Thank you very much.

1 ACCEPTED SOLUTION
v-jiewu-msft
Community Support
Community Support

Hi @surajbh ,

First of all, many thanks to @bhanu_gautam  for your very quick and effective replies.

Based on my testing, please try the following methods as workaround:

1.Create the simple table.

vjiewumsft_0-1715152421469.png

2.Create the new measure to calculate average.

 

Average = 
VAR valu_ = SUM('Table'[Values])
VAR spee = CALCULATE(SUM('Table'[Values]), ALLEXCEPT('Table', 'Table'[Truck], 'Table'[Sped]))
VAR spe_count = DISTINCTCOUNT('Table'[Month])
VAR result = DIVIDE(spee, 4)
RETURN
result

 

3.Drag the measure into the matrix visual.

vjiewumsft_1-1715152470424.png

4.Change the measure format to the percentage.

vjiewumsft_2-1715152479525.png

5.The result is shown below.

vjiewumsft_3-1715152488275.png

 

Best Regards,

Wisdom Wu

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

View solution in original post

3 REPLIES 3
v-jiewu-msft
Community Support
Community Support

Hi @surajbh ,

First of all, many thanks to @bhanu_gautam  for your very quick and effective replies.

Based on my testing, please try the following methods as workaround:

1.Create the simple table.

vjiewumsft_0-1715152421469.png

2.Create the new measure to calculate average.

 

Average = 
VAR valu_ = SUM('Table'[Values])
VAR spee = CALCULATE(SUM('Table'[Values]), ALLEXCEPT('Table', 'Table'[Truck], 'Table'[Sped]))
VAR spe_count = DISTINCTCOUNT('Table'[Month])
VAR result = DIVIDE(spee, 4)
RETURN
result

 

3.Drag the measure into the matrix visual.

vjiewumsft_1-1715152470424.png

4.Change the measure format to the percentage.

vjiewumsft_2-1715152479525.png

5.The result is shown below.

vjiewumsft_3-1715152488275.png

 

Best Regards,

Wisdom Wu

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

@v-jiewu-msft thank you for the file and answer. well apperciate it.
i see average is always repeated in the column,
but i would like to show at the end of the table, like the way total is shown but would like to show average ( in %) in the last column.  
i think when writing the formula in average, i should write something so that it ignore it on the month columns but shows in the last column only. 
could you please help if possible, any lead is always appreciated. 

thanks.

bhanu_gautam
Super User
Super User

@surajbh , You can create a simple measure for Average speed and Average Velocity 

 


Average Speed = AVERAGE('TableName'[speed])

Average Velocity = AVERAGE('TableName'[velocity])

 

And for Percentage you can use this measure


Average Percentage = DIVIDE([Average Speed], COUNTROWS('TableName') / COUNTA('TableName'[speed]) * 100, 0




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Top Kudoed Authors