Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
 
					
				
		
Hello-
I am looking to re-create the below excel formula using DAX in Power BI.
When I do it in Power BI, I get column results:
23
17
18
0
0
0
The end column result should be the yellow column (like the screenshot above):
23
17
18
9.666
9.666
9.666
I tried DAX Formula -->
But it doesn't work 😞
Solved! Go to Solution.
Hi @Anonymous
try column
Column = if([2020 Forecast_]=0;average(Table1[2020 Forecast_]);[2020 Forecast_])if you do not need a row context
and column
Column = if([2020 Forecast_]=0;calculate(average(Table1[2020 Forecast_]);ALL(Table1));[2020 Forecast_])if you do need
do not hesitate to give a kudo to useful posts and mark solutions as solution
Hi @Anonymous
try column
Column = if([2020 Forecast_]=0;average(Table1[2020 Forecast_]);[2020 Forecast_])if you do not need a row context
and column
Column = if([2020 Forecast_]=0;calculate(average(Table1[2020 Forecast_]);ALL(Table1));[2020 Forecast_])if you do need
do not hesitate to give a kudo to useful posts and mark solutions as solution
Thanks @az38. I had to change the ; to a , but other than that, it worked well. Thank you!
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | 
| User | Count | 
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 10 | |
| 9 |