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.
hello,
I added this Measure in a Matrix, which calculates the transactions volume by hour:
"table1" has the percentage distribution of transactions by hour, as shown below:
hour % channel
1 1% Channel A
2 2% Channel B
3 8% Channel A
... .... ....
"table2" has the total volume of transactions for the day, by Channel:
day channel transaction_volume
feb 1 Channel A 100
feb 2 Channel B 40
... ....
The Matrix has 'Hours' in the columns and 'Channels' in the rows and for some reasons only either the rows subtotal or columns subtotal is showing correctly, but not both together. This is the Measure that I used in the Matrix to show results:
Hi there.
I'm not sure why you're using AVERAGE... I think this is not what you should do. Have a look at this model and the calculation. I think this might be what you really want...
https://1drv.ms/x/s!ApyQEauTSLtOgYJNmDbSzQj8jbcu-A?e=WgQjNU
Best
D
hi @Anonymous ,
The Total calculation does precisely what you asked it to do, namely calculate the average for the day.
What you actually want to see, if I am not mistaken, is the sum of the hourly averages. In order to calculate this you need to calculate the hourly values again and then sum them into the required total.
Something like (depends also in the relations present):
SUMX(
summarize('table2',
table2[Channel],
table1[Hour],
"Monthly AVG",monthlyAverages
),
[Monthly AVG])
replace sumx(AverageTotal,[Monthly AVG]) with the above code snippet
Jan
if this is a solution for you, don't forget to mark it as such. thanks
thanks @JustJan , but unfortunately this won't work as I cannot have fields from different tables in the Summarize function.
@Anonymous...
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
12 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
18 |