Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have a visual a table with:
Month - name of the month
Avg Sale Per Year - average sale in Januaries, Februaries etc. from selected timeframe
Sold CY - sold in current year in each month
AvgWsp - factor comparing the amount of Sold in Current year divided by Average Sale per Year
Now I need to calculate the average factor this means:
Solved! Go to Solution.
Hi @Fistachpl
Did you apply sort by column to the Month field? If so, please add the sort reference field to the ALL function as well, you can try below measure.
AvgWsp over the year = COUNTX(ALL('TMiesiące'[Month],'TMiesiące'[Month Number]),[AvgWsp])
// Change the 'TMiesiące'[Month Number] to your acthal name, which should be use to sort by column setting.
For the rationale for doing this, pls see my answer in another thread.
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Tomorrow I will read about this sorting but I did not have top change the sorting in any way. It worked perfectly.
Thank You!
Hi @Fistachpl
I'm not sure if I understood your question correctly, you can try this measure.
Amount of factors = SUMX(ALL('TMiesiące'[Month]),[AvgWsp over the year])
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
This calculates the sum of those but to get average factor I need to calculate the sum (which I already have) and divide it by the number of factors to get the average factor.
I tried to calculate by:
and got:
But in the table I want to have 5.
I know I can just use:
Hi @Fistachpl
Did you apply sort by column to the Month field? If so, please add the sort reference field to the ALL function as well, you can try below measure.
AvgWsp over the year = COUNTX(ALL('TMiesiące'[Month],'TMiesiące'[Month Number]),[AvgWsp])
// Change the 'TMiesiące'[Month Number] to your acthal name, which should be use to sort by column setting.
For the rationale for doing this, pls see my answer in another thread.
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |