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.
I want to create a code that can detect one statement true but the other is false and not sure how to write it in DAX. I would like it to flag in a new colomn where address no. is the same but the post code is not the same.
For example
Current Data | ||
Address No. | Post Code | |
13334 | 124 | |
13334 | 123 | |
54899 | 124 | |
56465 | 111 | |
46546 | 234 | |
46546 | 234 | |
Result | ||
Address No. | Post Code | Test |
13334 | 124 | Yes |
13334 | 123 | Yes |
54899 | 124 | No |
56465 | 111 | No |
46546 | 234 | No |
46546 | 234 | No |
13334 | 111 | Yes |
Solved! Go to Solution.
@Anonymous , Create a new column like
New column =
var _cnt = calculate(distinctcount(Table[ Post Code]), filter(Table,[Address No] = earlier(Table[Address No])))
return
if(_cnt >1 , "Yes", "No")
@Anonymous , Create a new column like
New column =
var _cnt = calculate(distinctcount(Table[ Post Code]), filter(Table,[Address No] = earlier(Table[Address No])))
return
if(_cnt >1 , "Yes", "No")
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 |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |