1.

SUMX(                   Filter(                             Values(‘Location’[Country]),                                             IF(                                                   ‘Location’[Country] =’India’,                                                   [SalesAmount] * 0.2,                                                   [SalesAmount] * 0.1                                               )                                   )                       )

Answer»

FOUR types of operators are available in DAX Language to perform calculations:

To compare values then use Comparison Operators.

Comparison operator
Meaning
Example
=
Equal to
[Region] = "INDIA"
==
Strict equal to
[Region] == "INDIA"
>
Greater than
[Sales Date] > "Jul 2019"
<
Less than
[Sales Date] < "Jul 1 2019"
>=
Greater than or equal to
[Amount] >= 10000
<=
Less than or equal to
[Amount] <= 200
<>
Not equal to
[Region] <> "INDIA"

To perform arithmetic calculations on values, use Arithmetic Operators.

Arithmetic operator
Meaning
Example
+ (plus sign)
Addition
3+3
– (minus sign)
Subtraction or sign
3–1–1
* (asterisk)
Multiplication
3*3
/ (forward slash)
Division
3/3
^ (caret)
Exponentiation
16^4

To join or concatenate two or more Text values then Concatenation operators.

Text operator
Meaning
Example
& (ampersand)
CONNECTS, or concatenates, two values to produce one continuous text value
[Country] & ", " & [area]

To return SINGLE values based on True or False, use Logical operators.

Text operator
Meaning
Examples
&& (double ampersand)
AND condition between two expressions that each have a Boolean result.
If both expressions return TRUE, result returns TRUE; otherwise returns FALSE.
([Region] = "India") && ([Cloths] = "yes"))
|| (double pipe symbol)
OR condition between two logical expressions. If either returns TRUE, the result is TRUE; only when both are FALSE is the result FALSE.
(([Region] = "India") || ([Cloths] = "yes"))
IN
Logical OR condition between each row being compared to a table. syntax uses curly braces.
‘Bike’[Color] IN { "Yellow", "Red", "GREEN" }


Discussion

No Comment Found