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
MoKi
Advocate I
Advocate I

Measure total amount per month / total amount per location / total amount per sales type

Hello. I would be very happy about your help.

I have one big table, including columns: locations, sales type, amount is, amount target, date (from 1.1.18 until 1.4.19).

 

Now I would like to have just the sum of the amount for each location and also the sum of the amount for each sales type. And then I would like to compare the locations among themselves and the sales types among themselves. Do I have to create a new table for each location? And if yes, how?

 

And also: In my big table I would like to have the sum of my amounts for one month. For example the sum of my amounts for april and then compare it with the sum of the previous amount. Do I have to use a measure? I tried different formulas, but it didn´t work.

 

Thank you a lot for help.

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@MoKi ,

 

You may try Matrix visual and take a look at this post.

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

Tank you for your answer. This doesn´t help me. I triede using the following steps. And I will mention my problems: 

For the item:

" In my big table I would like to have the sum of my amounts for one month. For example the sum of my amounts for april and then compare it with the sum of the previous amount. Do I have to use a measure? I tried different formulas, but it didn´t work."

I created the measure: 

previous_month = CALCULATE(SUM(Table1[amount]);DATEADD(Table1[Date];-1;MONTH))
Using a matrix, the rows for the previous month are empty, but for every location I get a sum for previous month. Why are the rows empty?

 

Then I tried to use the following:
current_month_sales = CALCULATE(SUM('Table1'[Sales]),FILTER('Table1',MONTH('Table1'[Month])=MONTH(TODAY())))

last_month_sales = var current_month= MONTH(TODAY()) return  CALCULATE(SUM('Table1'[Sales]),FILTER('Table1',MONTH('Table1'[Month])=current_month -1))

 

But the problem here: Power BI sums the same month of each year, e.g. amount of April 2018 and 2019.

 

And can I create a measure, where do I get just the amount per location and a second measure to get the amount from the sales type?

 

If I want to compare two locations or two sales types, are measures the best opportunity?


Thanks a lot.

 

 

 

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.