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

Basic Question? Divide for average costs per month

Hi,

 

I'm very new and have a realy basic problem. I have 5 projects and a sum of costs over a few month for each of them.

Now in the table it seems to be very easy to calculate the average costs for each month through dividing the Costs with the Counter of months. But in a measure this doesn't work at all.

 

Unbenannt.JPG

 

I tried following Formula:

Measure = DIVIDE(SUM('Detailed Usage (2)'[Costs]); COUNT('Time'[Month])).

 

So my question is, how can I get the avaerage costs per month for each project to do a forecast for the rest of the year?

 

Thanks in advance!

2 ACCEPTED SOLUTIONS
Vvelarde
Community Champion
Community Champion

If Time.Month are string the Function Count not work because only work with numbers. Try with CountA




Lima - Peru

View solution in original post

v-qiuyu-msft
Community Support
Community Support

Hi @Talvien,

 

In your scenario, as 'Detailed Usage' table contains project, month and costs columns, you can calculate average costs for each project per month, you can create a measure like that:

 

Measure= sum('Detailed Usage'[Costs]/DISTINCTCOUNT('Detailed Usage'[Month])

 

Then you can use table visual to display [Project] and Measure values. See:

 

q1.PNG

 

If you have any question, please feel free to ask.

 

Best Regards,
Qiuyun Yu

 

Community Support Team _ Qiuyun Yu
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

4 REPLIES 4
v-qiuyu-msft
Community Support
Community Support

Hi @Talvien,

 

In your scenario, as 'Detailed Usage' table contains project, month and costs columns, you can calculate average costs for each project per month, you can create a measure like that:

 

Measure= sum('Detailed Usage'[Costs]/DISTINCTCOUNT('Detailed Usage'[Month])

 

Then you can use table visual to display [Project] and Measure values. See:

 

q1.PNG

 

If you have any question, please feel free to ask.

 

Best Regards,
Qiuyun Yu

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Vvelarde
Community Champion
Community Champion

Exist a relationship between these tables..Detailed Usage and Time? and if exist what is the key..




Lima - Peru

Yes, there are relations. Time.ID is related to Detailed Usage (2).Month. Time.Month are Strings; the names of the Months instead of numbers.

 

Unbenannt.JPG

Vvelarde
Community Champion
Community Champion

If Time.Month are string the Function Count not work because only work with numbers. Try with CountA




Lima - Peru

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.