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 am struggling with trying and getting the third column 'Change' (in the table below) working in Power BI.
Basically I need to work out if the value column has changed two or more times for each ID. So values that change once within the same ID would not count - only if the value changes 2 or more times per each ID.
In the table below you see that:
ID 1 value changed twice so that = 'Yes'
ID 2 did not change = 'No'
ID 3 value changed once so that = 'Yes'
Any help would be much appreciated.
Table1:
ID | Value | Change |
1 | 1000 | Yes |
1 | 1000 | |
1 | 1200 | |
1 | 1800 | |
2 | 720 | No |
2 | 720 | |
3 | 900 | No |
3 | 900 | |
3 | 1000 |
Solved! Go to Solution.
You can use this calculated column
Column = IF ( CALCULATE ( DISTINCTCOUNT ( Table1[Value] ), ALLEXCEPT ( Table1, Table1[ID] ) ) > 2, "yes", "no" )
So you can count distinct values per each ID and if they are greater than 2...answer should be "yes"...
Isn't it?
Yeah, I just have no idea how to do it even though this should be really basic. Like I have no idea what the DAX formula for this would be.
You can use this calculated column
Column = IF ( CALCULATE ( DISTINCTCOUNT ( Table1[Value] ), ALLEXCEPT ( Table1, Table1[ID] ) ) > 2, "yes", "no" )
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 |
---|---|
106 | |
98 | |
80 | |
67 | |
63 |
User | Count |
---|---|
145 | |
111 | |
104 | |
84 | |
64 |