Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello Community,
I need help in writing a DAX for retrieving a value from multiple column based on condition.
For example from column "Name" i need to select only Alice and display the sum of "Salary" and "Bonus" in column "Total"
Thanks in advance,
Saurav
Solved! Go to Solution.
@Novice100 , New measure
= sum(Table[Salary]) + Sum(Table[Bonus])
If you need you column
Sumx(filter(Table, [Name] + earlier([Name]) ) , [Salary] +[Bonus])
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new column.
Total CC =
VAR _condition = Data[Name] = "Alice"
RETURN
( Data[Salary] + Data[Bonus] )
* DIVIDE ( _condition, _condition )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new column.
Total CC =
VAR _condition = Data[Name] = "Alice"
RETURN
( Data[Salary] + Data[Bonus] )
* DIVIDE ( _condition, _condition )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@Novice100 , New measure
= sum(Table[Salary]) + Sum(Table[Bonus])
If you need you column
Sumx(filter(Table, [Name] + earlier([Name]) ) , [Salary] +[Bonus])
User | Count |
---|---|
41 | |
27 | |
23 | |
19 | |
16 |
User | Count |
---|---|
55 | |
35 | |
21 | |
18 | |
15 |