Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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
)
)
)
User | Count |
---|---|
18 | |
18 | |
14 | |
13 | |
13 |
User | Count |
---|---|
17 | |
14 | |
14 | |
10 | |
8 |