Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
Hi all,
i am trying to obtain with a measure the average sales per month per a specific year.
In particular:
- if the year is finished, i want to SUM all the sales per a specific year and then divide it by 12
- if the year is still ongoing, i want to SUM all the sales for the months passed then divide that number by the number of months passed. for example, if the measure is calculate today i want to sum sales of 2021 divided 6 (months inc June).
the formula i used below is:
Solved! Go to Solution.
I actually solved this myself creating the "virtual" table below
I actually solved this myself creating the "virtual" table below
maybe you can try this
Measure = CALCULATE(Sales[Sales-total],ALLEXCEPT('Table','Table'[year]))/12
pls see the attachment below
Proud to be a Super User!
@alevandenes , Try like
This year Sales = CALCULATE(([Sales Amount])/12,DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
or
This year Sales = CALCULATE(averagex(values('Date'[Month year]), [Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
they do not work 😞
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
74 | |
70 | |
70 | |
45 | |
41 |
User | Count |
---|---|
51 | |
47 | |
32 | |
28 | |
27 |