cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ElenaJohansen Frequent Visitor
Frequent Visitor

Average per month in a table

Hello

 

My problem is to have a average per month in a table, example:

 

 

 Udklip.PNG

 

It has to look like:

 

Udklip2.PNG

 

Anyone that could help me with a dax formula? 

I've tried Averagex, but I wouldn't work.

 

Please Help :-) 

9 REPLIES 9
v-cherch-msft Super Contributor
Super Contributor

Re: Average per month in a table

Hi @ElenaJohansen

 

You may create a measure like below:

Measure =
AVERAGEX (
    FILTER (
        ALL ( Table1 ),
        MONTH ( Table1[Created Date] ) = MONTH ( MAX ( Table1[Created Date] ) )
    ),
    Table1[Cost]
)

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ElenaJohansen Frequent Visitor
Frequent Visitor

Re: Average per month in a table

Hello Cherie

 

Thanks for your quick answer.

But it doesn't seem right - look below:

 

 

Udklip.PNGUdklip2.PNG

 

What do I do wrong?

 

Please help :-) 

 

v-cherch-msft Super Contributor
Super Contributor

Re: Average per month in a table

Hi @ElenaJohansen

 

Could you show me the data or share your .pbix file?Below is my sample data.You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ElenaJohansen Frequent Visitor
Frequent Visitor

Re: Average per month in a table

Hi Cherie

 

It got it to work now - it was a data error.

Udklip4(1).PNG

 

But I now have a new issue - I have to see it per item. 

So in this I need 973202 item to calculate measure like above mentioned (for March it has to be 8,00 not 5,36)

When I click on the overview table at 973202, it still counts all the lines with in the measure, it has to be per item, hope you understand? How do i do?

 

 

Udklip4(2).PNG

 

Hope you can help me :-) 

v-cherch-msft Super Contributor
Super Contributor

Re: Average per month in a table

Hi @ElenaJohansen

 

It seems the cost is a measure.Could you provide the formula of the cost measure?It would be better if you could paste the data here instead of the screenshot.

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ElenaJohansen Frequent Visitor
Frequent Visitor

Re: Average per month in a table

Hi Cherie

 

The cost measure (its a new column) comes here:

 

Cost = Ark1[Line Amount MST]/Ark1[Purchased Quantity]
 
Hope you can help me :-) 
 
v-cherch-msft Super Contributor
Super Contributor

Re: Average per month in a table

Hi @ElenaJohansen 

 

Try below measure:

Measure 3 =
AVERAGEX (
    FILTER (
        ALLSELECTED ( Ark1 ),
        MONTH ( Ark1[Created Date] ) = MONTH ( MAX ( Ark1[Created Date] ) )
    ),
    [Cost]
)

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-cherch-msft Super Contributor
Super Contributor

Re: Average per month in a table

Hi @ElenaJohansen 

 

Could you tell me if your problem has been solved? If it is,kindly mark the helpful answer as a solution and welcome to share your own solution. More people will benefit from here. If not, please share more details for us so that we could help further on it.

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ElenaJohansen Frequent Visitor
Frequent Visitor

Re: Average per month in a table

Hi Cherie

 

The problem has not been solved - i need the average cost pr. item and not for the hole table - can you help with that? 

 

Regards Elena

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 297 members 3,731 guests
Please welcome our newest community members: