The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Everybody,
The initial measure I used to get the Average Per Week Per Country is somewhat suspect but it worked. I just divided by the amount of weeks involved in the time period:
***I don't know if this information is worthwhile but the previous measure is based on a prior measure for "Order Amount":
**
When I put the Average Per Week Per Country measure into a Matrix I get the right numbers but the total is a sum:
I need the total AVERAGE of the 6 countries, not the sum. Is there a way to do this that can be inscribed inside of the Average Sales Per Week Per Country measure? I'm only supposed to create a set number of measures for this.
Again, thanks for any help.
-Michael G.
Solved! Go to Solution.
Hi @MichaelG1117 ,
Based on what you’ve mentioned, to change total on a Matrix Visual from a sum to and average by using DAX, you can follow these steps:
Here are my test data:
1.Create a measure to count average of sum of the amount
Average Sales Per Week Per Country-corrected = VAR T = SUMX ( 'Order', 'Order'[SalesPrice] * 'Order'[OrderQuetity] ) RETURN IF ( ISFILTERED ( 'Order'[Country] ), T, T/55)
2.Final output
In order for you to solve the problem faster, you can refer to the following documentation
How to Get Your Question Answered Quickly - Microsoft Fabric Community
Best Regards,
Albert He
Hi @MichaelG1117 ,
Based on what you’ve mentioned, to change total on a Matrix Visual from a sum to and average by using DAX, you can follow these steps:
Here are my test data:
1.Create a measure to count average of sum of the amount
Average Sales Per Week Per Country-corrected = VAR T = SUMX ( 'Order', 'Order'[SalesPrice] * 'Order'[OrderQuetity] ) RETURN IF ( ISFILTERED ( 'Order'[Country] ), T, T/55)
2.Final output
In order for you to solve the problem faster, you can refer to the following documentation
How to Get Your Question Answered Quickly - Microsoft Fabric Community
Best Regards,
Albert He
Definitely on the right track, this is what turned out to be the final solution:
"Quantity"*"Sales Price"/55 because there's 55 weeks total over the duration of time and "total price"/6 because there's 6 countries involved. Thank a million for your help!
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |