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.
// Not sure if I've got the logic right as I can't see
// the model. Also, not sure if all the language
// constructs will work in the DQ mode.
[Base Value] = SUM( 'Table'[Value] )
[Value Converted] =
VAR SelectedCurrency =
// This line says: if there is only one visible Code
// in the current context, take it. Otherwise use "USD".
COALESCE( SELECTEDVALUE( Results_ExchangeRates[Code] ), "USD" )
// This will return the rate if there's only one visible
// in the current context. If none is visible or many, BLANK
// will be returned.
VAR SelectedRate = SELECTEDVALUE( Results_ExchangeRates[Rate] )
VAR EffectiveRate =
// For code = "USD", return rate = 1, else take
// the rate from above.
IF( SelectedCurrency = "USD", 1, SelectedRate )
VAR Result = [Base Value] * EffectiveRate
RETURN
Result
User | Count |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |