Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I'm getting "NaN" from this formula, and i cant see why? Anything obviously wrong here?
Solved! Go to Solution.
Hi @Anonymous ,
Try this:
Invoiced GGR (€) =
VAR __Numerator =
SUMX (
'Fact Workday Transactions',
'Fact Workday Transactions'[In Source Currency]
)
VAR __Denominator =
LOOKUPVALUE (
'Exchange Rate'[Exchange Rate],
'Exchange Rate'[ExchangeRateDate], 'Fact Workday Transactions'[Date],
'Exchange Rate'[CurrencyCode], 'Fact Workday Transactions'[CUR]
)
RETURN
IF ( __Denominator <> 0, DIVIDE ( __Numerator, __Denominator ) )
Or this:
Invoiced GGR (€) =
VAR __Denominator =
LOOKUPVALUE (
'Exchange Rate'[Exchange Rate],
'Exchange Rate'[ExchangeRateDate], 'Fact Workday Transactions'[Date],
'Exchange Rate'[CurrencyCode], 'Fact Workday Transactions'[CUR]
)
RETURN
SUMX (
'Fact Workday Transactions',
IF (
__Denominator <> 0,
DIVIDE ( 'Fact Workday Transactions'[In Source Currency], __Denominator )
)
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Try this:
Invoiced GGR (€) =
VAR __Numerator =
SUMX (
'Fact Workday Transactions',
'Fact Workday Transactions'[In Source Currency]
)
VAR __Denominator =
LOOKUPVALUE (
'Exchange Rate'[Exchange Rate],
'Exchange Rate'[ExchangeRateDate], 'Fact Workday Transactions'[Date],
'Exchange Rate'[CurrencyCode], 'Fact Workday Transactions'[CUR]
)
RETURN
IF ( __Denominator <> 0, DIVIDE ( __Numerator, __Denominator ) )
Or this:
Invoiced GGR (€) =
VAR __Denominator =
LOOKUPVALUE (
'Exchange Rate'[Exchange Rate],
'Exchange Rate'[ExchangeRateDate], 'Fact Workday Transactions'[Date],
'Exchange Rate'[CurrencyCode], 'Fact Workday Transactions'[CUR]
)
RETURN
SUMX (
'Fact Workday Transactions',
IF (
__Denominator <> 0,
DIVIDE ( 'Fact Workday Transactions'[In Source Currency], __Denominator )
)
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Icey - Fantastic. Thank you so much!
Actually i like the logic here of creating two VAR as numberator and denominator, I'll apply that logic for other calcs as its a great way to follow through on calcs later on.
Really appreciate all comments and replies!
Regards
Ben
Try like
Invoiced GGR (€) =
var _m =LOOKUPVALUE('Exchange Rate'[Exchange Rate],
'Exchange Rate'[ExchangeRateDate],'Fact Workday Transactions'[Date],
'Exchange Rate'[CurrencyCode],'Fact Workday Transactions'[CUR]))
SUMX(divide('Fact Workday Transactions',
'Fact Workday Transactions'[In Source Currency] ,if(_m=0, blank(),_m)))
or handle with IFERROR
Hey,
On this one, i dont get the second half of this at all... It doesnt seem to like it.
why is such a simple calcultion so hard to do i wonder..sigh.
Try troubleshooting like this:
Invoiced GGR (€) =
VAR __Numerator = SUMX('Fact Workday Transactions',
'Fact Workday Transactions'[In Source Currency]
VAR __Denominator =
LOOKUPVALUE('Exchange Rate'[Exchange Rate],
'Exchange Rate'[ExchangeRateDate],'Fact Workday Transactions'[Date],
'Exchange Rate'[CurrencyCode],'Fact Workday Transactions'[CUR]))
RETURN
__Denominator
hmm, thanks, but this is just giving me a value of 1 everywhere now.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
95 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |