Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi there,
I am trying to add up values in a column based on whether a value in another column has a value of 4 or 5.
What I'd like to be able to do, from the information in the pictur above, is scan through the NEW CRATE column, and if the value is a "4" or "5", I want to add that value from the BALANCE column and place it in a new variable or that I can use in a division equation.
I'd like to see the value of "21400" stored in a new value and then later used for downstream DAX functions. What I have so far is this:
Solved! Go to Solution.
Hi,
Write this measure and drag it to a card visual
Measure = calculate(sum(Data[Balance]),data[new crate]=4||data[new crate]=5)
Hope this helps.
Hi,
Write this measure and drag it to a card visual
Measure = calculate(sum(Data[Balance]),data[new crate]=4||data[new crate]=5)
Hope this helps.
Hi Ashish,
Can you help me understand the "||" and how this is used properly? I cant seem to finish the rest of your DAX expression cause I'm getting an error message, "The following syntax error occurred during parsing: Invalid toekn, Line 1, Offset 52, |E". The "E" is the first letter of the table of data I'm using. Might be good to mention that both "Balance" and "New Crate" are in the same table.
Thanks for your help, Ashish!
You are welcome. || means OR. Write my formula as a measure.
@Reawaken , In case you need a new column
New column = if( Equifax[New Crate] in {4,5} , [Balance], blank())
Hi Amit,
You're right that my table is called Equifax, with dimenions Balance, New Crate, etc., but I dont think your expression is working cause I don't see the drop down to select "Equifax[New Crate]" after the "IF" statement. Help! I'm a newbie at this haha.
Thanks!
Paul
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
107 | |
106 | |
91 | |
67 |
User | Count |
---|---|
162 | |
133 | |
132 | |
93 | |
91 |