Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I have sales figures for different products per day and want to build a report showing:
- sales for each of the last seven days per product
- total sales for the current month per product
- average sales per day for the current week
I managed to create a measure which summarised the sales for the last seven days which is then shown in the matrix:
How can I now add the monthly total and maybe the average sales per day for the current week?
Thanks
Matthias
Solved! Go to Solution.
Hi @MReinagl
Please correct me if I wrongly understood your question.
(1)We can achieve monthly total through the time hierarchy.
Original matrix visual
Use time hierarchy function:
(2)Create a column to get the average sales per day for the current week .And then add the column in Vaules .
average = CALCULATE(AVERAGE('Table'[Price]),FILTER('Table','Table'[Date]>MAX('Table'[Date])-7 && 'Table'[Date]<= MAX('Table'[Date])))
I have attached my pbix file, you can refer to it .
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @MReinagl
Please correct me if I wrongly understood your question.
(1)We can achieve monthly total through the time hierarchy.
Original matrix visual
Use time hierarchy function:
(2)Create a column to get the average sales per day for the current week .And then add the column in Vaules .
average = CALCULATE(AVERAGE('Table'[Price]),FILTER('Table','Table'[Date]>MAX('Table'[Date])-7 && 'Table'[Date]<= MAX('Table'[Date])))
I have attached my pbix file, you can refer to it .
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
this does not really help me I'm afraid.
I want to show the sales for the seven days and then next to it the average across all seven days. Basically like this:
Mon Tue Wed Thu Fri Sat Sun AVG
Product A 100 110 90 90 110 100 100 100
Product B 80 80 70 70 60 50 50 65,71
Product C 40 60 60 60 40 40 40 48,57
Thanks
Matthias
OK, I managed to create a measure to show the month-to-date amount. But how do I manage now that this MTD amount is shown only once, i.e. for the last day:
The measure I created is:
Hey @MReinagl ,
you can calculate the average for the last 7 days like that:
Average last 7 days =
CALCULATE (
AVERAGE(myTable[myColumn]),
DATESINPERIOD (
'Date'[Date],
MAX ( 'Date'[Date] ),
-7,
DAY
)
)
OK - but how can I display this now next to the data for the seven days, i.e. right of the columns shown in my screenshot at the top?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
84 | |
83 | |
64 | |
60 | |
55 |
User | Count |
---|---|
179 | |
108 | |
105 | |
71 | |
70 |