The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I'm trying to replicate this formula (a calculated field within a Pivot table):
=IFERROR(IF(AND('Sales'=0,'Forecast'>0),0, 1-IF('ABS Error'/'Sales'>1,1,'ABS Error'/'Sales')),NA())
This is what I did (calculated column):
=IFERROR(IF(AND([Sales]=0,[Forecast]>0),0, 1-IF([ABS Error]/[Sales]>1,1,[ABS Error]/[Sales])),BLANK())
But I'm getting different figures for example the excel formula will show 63.8% but Power BI shows 629.8%
Any ideas what I might be doing wrong or how to write it better?
Solved! Go to Solution.
@Anonymous Hey ,
Can tell your requirement .what exactly are trying to achieve from this .
you can try this as a measure .
=IFERROR(IF(AND([Sales]=0,[Forecast]>0),1, 1-IF([ABS Error]/[Sales]>1,1,[ABS Error]/[Sales])),BLANK())
or
=IFERROR(IF(AND([Sales]=0,[Forecast]>0),1-IF([ABS Error]/[Sales]>1,1,[ABS Error]/[Sales])),BLANK())
Try above formula
@Anonymous Hey ,
Can tell your requirement .what exactly are trying to achieve from this .
you can try this as a measure .
=IFERROR(IF(AND([Sales]=0,[Forecast]>0),1, 1-IF([ABS Error]/[Sales]>1,1,[ABS Error]/[Sales])),BLANK())
or
=IFERROR(IF(AND([Sales]=0,[Forecast]>0),1-IF([ABS Error]/[Sales]>1,1,[ABS Error]/[Sales])),BLANK())
Try above formula
Thank you, the first measure worked, I also needed to create sum measures of the columns used.
User | Count |
---|---|
20 | |
8 | |
7 | |
7 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
9 | |
8 |