Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hey guys!
I need a new column where it sums each instance of eash person.
I have a table like this:
ID Number
1 5
2 3
3 4
1 2
1 3
2 1
And I need something like this:
ID | Number | Calculated Column
1 5 10
2 3 4
3 4 3
1 2 10
1 3 10
2 1 4
The biggest problem is: there is another column where I have an exclusive identifier (it's used to relate to another table), for each row, so differentes instances of the ID 1 have different identifiers. My final goal is to find how many different people have Calculated Column > 5.
Can anyone help me?
Solved! Go to Solution.
Hi @FelipePalomino ,
Try this code for a column:
CALCULATE(SUM(TABLE[Number]); FILTER(TABLE; TABLE[ID] = EARLIER(TABLE[ID]))
In your measure, count it as distinct id where this column is > 5.
@FelipePalomino , try a new column like
SUMX(FILTER(TABLE, TABLE[ID] = EARLIER(TABLE[ID]),TABLE[Number]))
or a new measure
calculate(SUM(TABLE[Number]),allexcept(TABLE[ID] ))
Hi @FelipePalomino ,
Try this code for a column:
CALCULATE(SUM(TABLE[Number]); FILTER(TABLE; TABLE[ID] = EARLIER(TABLE[ID]))
In your measure, count it as distinct id where this column is > 5.
Thanks!!
It worked just fine!
I have never used this "earlier" before, so you solved the problem and I learned something new. 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |