Forum Discussion
Match Values in Same Columns with condiiton
I have data whch contain Survey Round id and Place digital Address
Survey round havdtwo IDs 1 and 2
now what i looking here is if round 1 have same place digital address in round 2 then its giv me Match if not then give me not match i tried but not success
if [place_digital_adress] = [place_digital_adress]
and [survey_round_id] <> 2
then "Match" else "Not match"
for example
if place digital adress have
100-00-00 ROund 1 Match
100-00-00 ROund 2 Match
100-00-01 ROund 2 Not Match
100-00-02 ROund 2 Not Match
100-00-03 ROund 1 Match
100-00-03 ROund 2 Match
https://docs.google.com/spreadsheets/d/1y1R88t-Q_nVs1Eh3FKwD-OxG5BYQ3mfW1sNOEto8Q94/edit?usp=sharing
- Anonymous6 years ago
HI SkorpionAAM
Try the below DAX to create a new column
_LOOK = var _val = LOOKUPVALUE('Table'[survey_round_id], 'Table'[place_digital_adress], 'Table'[place_digital_adress],BLANK()) RETURN IF(ISBLANK(_val),"Match","Not Match")
5 Replies
- Greg_Deckler
Community Champion
SkorpionAAM - Hard to follow, but looks like you are trying to compare one row with some other rows. In general, see my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586.
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __Previous = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Value])
RETURN
__Current - __PreviousIn your case, maybe:
Column = VAR __Table = FILTER('Table',[Survey]=EARLIER([Survey]) && [Round] <> EARLIER([Round])) RETURN IF(NOT(ISBLANK(COUNTROWS(__Table))),"Match","Not Match")Otherwise, Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.- SkorpionAAM
Helper V
Please find the sample data which i add above thanks
https://docs.google.com/spreadsheets/d/1y1R88t-Q_nVs1Eh3FKwD-OxG5BYQ3mfW1sNOEto8Q94/edit?usp=sharing
- amitchandak
Super User
SkorpionAAM , I looked at the data. I do see a common value between round 1 and 2 where I can compare the values and say that place_digit_address is same
- AnonymousNot applicable
HI SkorpionAAM
Try the below DAX to create a new column
_LOOK = var _val = LOOKUPVALUE('Table'[survey_round_id], 'Table'[place_digital_adress], 'Table'[place_digital_adress],BLANK()) RETURN IF(ISBLANK(_val),"Match","Not Match")