Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all,
I need to return the accurate values, my table is build with 4 different measures. I need to calculate an average, but, as you see for 3 columns I have no value in the first column, so the denominator should be 2 and the correct value 100%.
My dax is a basic formula: Average = (value1+value2+value3) / 3.
Solved! Go to Solution.
Hi,
I am not sure how your data model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
All measures are in the attached pbix file.
Average expected percent: =
VAR _onepercenttable =
ADDCOLUMNS (
VALUES ( Data[Name] ),
"@one percent", [Trial one percent measure:]
)
VAR _twopercenttable =
ADDCOLUMNS (
VALUES ( Data[Name] ),
"@two percent", [Trial two percent measure:]
)
VAR _threepercenttable =
ADDCOLUMNS (
VALUES ( Data[Name] ),
"@three percent", [Trial three percent measure:]
)
VAR _uniontables =
SELECTCOLUMNS (
UNION ( _onepercenttable, _twopercenttable, _threepercenttable ),
"@Name", Data[Name],
"@percent", [@one percent]
)
RETURN
AVERAGEX ( _uniontables, [@percent] )
Thank you Jihwan Kim, it worked!
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
19 | |
13 | |
7 | |
5 |