Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone,
I have a table :
Site Frs Code
NAB A X
NAB A X
P7 A Y
P3 A Z
P3 A Z
Result table expected :
Site Frs Code
NAB A Y
NAB A Y
P7 A Y
P3 A Y
P3 A Y
In other words, I would like to have in the column « code », the resulting code of « frs » = « A » when we have the « site » = « P7 ». I would like to have a DAX code for that request please.
Thanks a lot
Solved! Go to Solution.
you can try:
CODE = IF( SEARCH("P7", CONCATENATEX( FILTER( 'Table', 'Table'[Frs] = EARLIER('Table'[Frs]) ), 'Table'[Site],",") ,,0), "Y", "N")
I added P3/B to test
you can try:
CODE = IF( SEARCH("P7", CONCATENATEX( FILTER( 'Table', 'Table'[Frs] = EARLIER('Table'[Frs]) ), 'Table'[Site],",") ,,0), "Y", "N")
I added P3/B to test
Or if you just want the value of Code for Site="P7" and Frs="A" for every row you could do the following:
Code2 = LOOKUPVALUE('Table'[Code],'Table'[Site],"P7",'Table'[Frs],"A")
Although I'm not sure why you'd want this in a column it feels more like something that you'd using a measure.
User | Count |
---|---|
75 | |
75 | |
45 | |
31 | |
27 |
User | Count |
---|---|
99 | |
89 | |
52 | |
48 | |
46 |