Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Dear All,
From DAX how to get TOTAL based on below table, if coulmn1 and 2 same value then its sould pick either one and remain raws based on value.
Column1 | Column2 | Total |
5 | 5 | |
10 | 10 | 10 |
20 | 20 | 20 |
30 | 30 | 30 |
35 | 35 | |
25 | 25 | |
Please help.
Regards,
Vipin
Solved! Go to Solution.
NewColumn =
IF( TableName[Column1] = TableName[Column2],
TableName[Column1],
IF( TableName[Column1] = 0 && TableName[Column2] = >0,
TableName[Column2],
IF( TableName[Column1] = >0 && TableName[Column2] = 0,
TableName[Column1],
BLANK() -- Or any other default value if no condition matches
)
)
)
NewColumn =
IF( TableName[Column1] = TableName[Column2],
TableName[Column1],
IF( TableName[Column1] = 0 && TableName[Column2] = >0,
TableName[Column2],
IF( TableName[Column1] = >0 && TableName[Column2] = 0,
TableName[Column1],
BLANK() -- Or any other default value if no condition matches
)
)
)
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
17 | |
10 | |
9 | |
8 | |
7 |
User | Count |
---|---|
20 | |
11 | |
8 | |
6 | |
6 |