Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear folks,
I am trying to calculate an expression. In the listbox Source I have 3 fields: LATAM, EMEA and All.
If I select both LATAM and EMEA, I need to calcule the expression with values from all.
I tried that but did not work:
=
If
(
Source = 'LATAM' and 'EMEA',
Sum ({<Source='All'>}[GM %])
,
Sum([GM %])
)
You guys can help me?
Thx
Try like:
=If(GetFieldSelections(Source)='EMEA, LATAM',Sum ({<Source='All'>}[GM %]),Sum([GM %]))
Thx for the fast response
This expression is returning the value 0.
Could you share your sample qvw to check?
No need.
That worked:
=
If(
GetFieldSelections(Source)='EMEA, LATAM'
,
-(Sum ([GM %]) - Sum({<[Source]=>}[GM %]))
,
Sum([GM %])
)
Thank you anyways