Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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.
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
56 | |
55 | |
54 | |
37 | |
29 |
User | Count |
---|---|
77 | |
62 | |
45 | |
40 | |
40 |