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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

DAX (Average of a card visualisation)

Hi All,

 

Megha3012_1-1631886908418.png

 

The card above shows the sum.

I have calculated that way so that I can get excess buffered stock of each week in a bar chart.

But now, I need the average of that when I select a card visualisation.

How can I take the average of a measure?

 

Any help would be appreciated!

 

Thank you!

1 ACCEPTED SOLUTION
m3tr01d
Continued Contributor
Continued Contributor

@Anonymous 

 

Suppose you have a Week_No or Week_Name that you use on your barchart with the measure.
You can iterate on each of the week, calculate the measure then take the average of each number.

That's what AVERAGEX will be able to do :

Avg_Week =
AVERAGEX(
	VALUES( 'Table'[Week_No] ),
	[Your_Initial_Measure]
)

 

Hope this helps.

View solution in original post

5 REPLIES 5
m3tr01d
Continued Contributor
Continued Contributor

@Anonymous 

 

Suppose you have a Week_No or Week_Name that you use on your barchart with the measure.
You can iterate on each of the week, calculate the measure then take the average of each number.

That's what AVERAGEX will be able to do :

Avg_Week =
AVERAGEX(
	VALUES( 'Table'[Week_No] ),
	[Your_Initial_Measure]
)

 

Hope this helps.

Anonymous
Not applicable

Thanks a lot! @m3tr01d 

VahidDM
Super User
Super User

Hi @Anonymous 

 

Your question is unclear for me, so can you share the code you used to create the [excess buffered stock] measure?

 

 

Appreciate your Kudos✌️!!

Coriel-11
Resolver I
Resolver I

This is my first time attempting a reply so apologies if I've misunderstood the question...

 

If you go to the "Fields" area of the Visualisation pane and right click on the "Excess Buffered Stock field" you should see options for "Sum", "Average", "Minimum" etc. If so simply select the "Average option".

 

If not, that's probably because the field is set to "Don't Summarize". To change this go to "Data view" (left hand side), select the relevant column in the table and then under "Column Tools" change "Summarization" to "Sum" (average migth work as well). Then just go go through the steps above and it should work.

Matt

Anonymous
Not applicable

Thank you for your response @Coriel-11 

But I just want to know if I can take an average of a particular measure.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors