Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 )
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 )
@Novice100 , New measure
= sum(Table[Salary]) + Sum(Table[Bonus])
If you need you column
Sumx(filter(Table, [Name] + earlier([Name]) ) , [Salary] +[Bonus])
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |