March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have below dummy data, and I would like to calculate Average sales by Country and Date(Month) and if one country is selected should show average sales by month selected and the country selected (I have converted date as slicer i.e Nov1987 & Mar 1988).
For example, if I select Sweden and select Date Slicer for November 1987 the Average will be 90 (80+100)Divide by 2 .
Date | Sales | ID | Country |
10/11/1987 | 80 | 10 | Sweden |
11/11/1987 | 100 | 11 | Sweden |
If they select Month: Nov 1987 and March 1988 and Filter Sweden they should get Average of 64.5 because the total sum of the selected filer is 645 then divide by selected values which are 10 (645/10)=64.5
Date | Sales | ID | Country |
10/11/1987 | 80 | 10 | Sweden |
11/11/1987 | 100 | 11 | Sweden |
01/03/1988 | 50 | 12 | Sweden |
02/03/1988 | 40 | 13 | Sweden |
03/03/1988 | 50 | 14 | Sweden |
04/03/1988 | 50 | 15 | Sweden |
05/03/1988 | 50 | 16 | Sweden |
06/03/1988 | 75 | 17 | Sweden |
07/03/1988 | 75 | 18 | Sweden |
08/03/1988 | 75 | 19 | Sweden |
Below is the full data dump (unfiltered )used on the above examples and I would like to calculate Average sales by Country and Date (Month) selected. Thank you.
I have tried below DAX but don't seem to filter all Average by Month and Country selected.
Date | Sales | ID | Country |
01/11/1987 | 100 | 1 | Turkey |
02/11/1987 | 50 | 2 | Turkey |
03/11/1987 | 100 | 3 | Turkey |
04/11/1987 | 100 | 4 | Turkey |
05/11/1987 | 50 | 5 | Turkey |
06/11/1987 | 100 | 6 | Turkey |
07/11/1987 | 80 | 7 | Turkey |
08/11/1987 | 100 | 8 | Turkey |
09/11/1987 | 100 | 9 | Turkey |
10/11/1987 | 80 | 10 | Sweden |
11/11/1987 | 100 | 11 | Sweden |
01/03/1988 | 50 | 12 | Sweden |
02/03/1988 | 40 | 13 | Sweden |
03/03/1988 | 50 | 14 | Sweden |
04/03/1988 | 50 | 15 | Sweden |
05/03/1988 | 50 | 16 | Sweden |
06/03/1988 | 75 | 17 | Sweden |
07/03/1988 | 75 | 18 | Sweden |
08/03/1988 | 75 | 19 | Sweden |
09/03/1988 | 50 | 20 | Germany |
10/03/1988 | 200 | 21 | Germany |
11/03/1988 | 75 | 22 | Germany |
12/03/1988 | 75 | 23 | Germany |
13/03/1988 | 40 | 24 | Germany |
14/03/1988 | 75 | 25 | Germany |
15/03/1988 | 75 | 26 | Germany |
16/03/1988 | 75 | 27 | Germany |
17/03/1988 | 60 | 28 | Germany |
18/03/1988 | 60 | 28 | Germany |
19/03/1988 | 60 | 28 | Germany |
Solved! Go to Solution.
Hi @MYDATASTORY ,
Believe this post is duplicated with the one below can you please delete it.
https://community.powerbi.com/t5/Desktop/How-calculate-Average-sale-by-country-and-date/m-p/1202061
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MYDATASTORY ,
Believe this post is duplicated with the one below can you please delete it.
https://community.powerbi.com/t5/Desktop/How-calculate-Average-sale-by-country-and-date/m-p/1202061
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
81 | |
62 | |
54 | |
41 |
User | Count |
---|---|
194 | |
106 | |
90 | |
63 | |
51 |