Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello all,
I have an excel data shown above where Percentage is the measure which i have calculated in Power Bi.
Now, I want to calculate quarterly average of percentage column.
Is there any way to calculate this ?
Right now, this is the one year of all the data; I have many years data and i want to calculate average accordingly.
I have not Date Dimension table, only one date column shown above(First Date of the month).
I saw other post of this forum ragarding this but they have used Date Key table; but i don't have that.
Please help me to get out from this.
Thanks in advance.
Solved! Go to Solution.
Hi @hemal_kanjia,
In your resource table, please create a calculated column to get quarter.
quarter = FORMAT(Test[Date],"Q")
Please see the screenshot below, which shows my sample table and calculated column result.
Then create the percentage and average by creating measures. using the formulas below.
Percentage = DIVIDE(SUM(Test[value]),SUMX(ALL(Test),Test[value])) Avg% = AVERAGEX(ALLEXCEPT(Test,Test[quarter]),Test[Percentage])
Fianlly, I create a table visual, select the date, quarter and two measure to disply as follows.
Best Regards,
Angelia
Hi @hemal_kanjia,
In your resource table, please create a calculated column to get quarter.
quarter = FORMAT(Test[Date],"Q")
Please see the screenshot below, which shows my sample table and calculated column result.
Then create the percentage and average by creating measures. using the formulas below.
Percentage = DIVIDE(SUM(Test[value]),SUMX(ALL(Test),Test[value])) Avg% = AVERAGEX(ALLEXCEPT(Test,Test[quarter]),Test[Percentage])
Fianlly, I create a table visual, select the date, quarter and two measure to disply as follows.
Best Regards,
Angelia
Hi, @v-huizhn-msft , thanks. that's a geat help. I am able to follow through the steps. However, I have a DateTable and had active relatinship wit the test table. This Average DAX:
Can we use the Medianx function similar to Averagex?
Avg% = AVERAGEX(ALLEXCEPT(Test,Test[quarter]),Test[Percentage])
Median = MedianX(ALLEXCEPT(Test,Test[quarter]),Test[Percentage])
Try this,
Avg % = CALCULATE(AVERAGE(Table1[Percentage]),FILTER(Table1,ENDOFQUARTER(Table1[Date])))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
87 | |
65 | |
50 | |
45 |
User | Count |
---|---|
217 | |
88 | |
81 | |
65 | |
56 |