Search code examples
powerbidata-analysisdax

How to compare two columns values in the same table PowerBI DAX


I am working in a data analysis project using MS Power BI, thankfully I'm doing good work to start. However, I'm facing a little problem with DAX syntax. I come from a web development background. Anyways, my current problem is that I have rental vehicles, which can be rented from one branch and handed in at another.

I would like to compare two columns values in the same table. 'owner_branch' and 'current_branch'. Is it a good choice to create a filter with DAX? Or should I move to R Language?


Solution

  • If I understood your problem correct you need Calculated Column like this:

    CompCol = IF ( Owner_Branch = Current_Branch, TRUE, FALSE )