The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance 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 |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
6 |