Forum Discussion
chocy
7 years agoFrequent Visitor
LOOKUP DAX FUNCTION help please :(
Hi,
i neep help with a dax function
NATURAL ACCOUNT 3 IS PARENT OF NATRUAL ACCOUNT 4. BUT I WANT THE LOOKUP COLUMN TO SHOW ALL CHILDREN OF 550P EXCEPT 550K AS 550P…. AND ALSO LOOKUP AND SHOW 521Q AND 501Q on there own…… NOTE THIS IS JUST AN EXAMPLE BUT NAT ACCOUNT LVL 4 HAS 100 OR SO DIFFERENT VALUES.
| CURRENT | EXPECT | ||||||||
| ASSUMED LOOKUP TABLE | natural account lvl4 | natural account lvl3 | NEW COLUMN | natural account lvl4 | natural account lvl3 | NEW COLUMN | |||
| 550W | 550Q | 550P | 550Q | 550P | 550P | ||||
| 550K | 550W | 550P | 550W | 550P | 550P | ||||
| 550L | 501Q | 50PP | 501Q | 50PP | 501Q | ||||
| 550N | 550W | 550P | 550W | 550P | 550P | ||||
| 550Q | 501Q | 50PP | 501Q | 50PP | 501Q | ||||
| 521Q | 550L | 550P | 550L | 550P | 550P | ||||
| 550L | 550P | 550L | 550P | 550P | |||||
| 521Q | 50PP | 521Q | 50PP | 521Q | |||||
| 550N | 550P | 550N | 550P | 550P | |||||
| 550N | 550P | 550N | 550P | 550P | |||||
| 550N | 550P | 550N | 550P | 550P | |||||
| 850P | 550P | 850P | 550P | 550P | |||||
| 550K | 550P | 550K | 550P | 550K | |||||
| 550K | 550P | 550K | 550P | 550K |
2 Replies
- v-cherch-msftMicrosoft Employee
Hi chocy
It seems you may create the calculated column as below. If it is not your case, please explain more about your expected output and give more data sample.
Column = IF ( 'CURRENT'[natural account lvl4] <> "550K" && 'CURRENT'[natural account lvl3] = "550P", 'CURRENT'[natural account lvl3], 'CURRENT'[natural account lvl4] )Regards,
Cherie
- v-cherch-msftMicrosoft Employee
Hi chocy
Could you tell me if your problem has been solved? If it is,kindly mark my answer as a solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from here.
Regards,
Cherie