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
Jo_Chrq
Helper I
Helper I

Add Average on Bar Chart

Hi All,

Using a Store table and a Sales table, I have a bar chart with income and margin per store on a bar chart.

I wonder if it's possible to add average values, as if it was a store as well?

Something like that in Excel:

Jo_Chrq_0-1674486958428.png

 

Many thanks in advance

Jo

 

1 REPLY 1
Mikelytics
Resident Rockstar
Resident Rockstar

Hi @Jo_Chrq 

 

Can you please try as a genertal measure this something like:

Average over column=
CACULATE
   AVERAGEX(
      VALUES(Table[Column]),
      [your base measure]
   ),
   ALL(Table[Column])
)

 

for table[column] use your strore column.

 

To make sure that you have the average as a separate bar in the end you would need to add the "average" value in the dimension table with a dummy key or something. Then it might be possible with the following appraoch:

 

with seperate abr chart =
IF(SELECTEDVALUE(Table[Column])="Average"),
   CACULATE
      AVERAGEX(
         VALUES(Table[Column]),
         [your base measure]
      ),
      ALL(Table[Column])
   )
   ,[your base measure]
)

 

without knowing the complete data model it is hard to give a answer on point but I hope it helps you.

 

Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

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.