Forum Discussion
Measure to compare values
- 8 years ago
Anonymous Apoliges I misread it but I'm guess still not 100% sure what your after.
If you getting errors that say you can't do T/F comparison do an if and return "Yes" or "No" which DAX will let you use in a filter statment like CALCULATE([measure],FILTER(table,[ADV Purch Check]="Yes"))
If you are building a visual that will setup the filter context such that you would expect a single value of each of the [ADVPurch] values then try ADVPurch1 = FIRSTNONBLANK(table1[ADVPurch]) and ADVPurch2 = FIRSTNONBLANK(table2[ADVPurch] this will allow you to extract the single value since measures require aggregate functions. Which you can then write a Mesure for ADVPurch Check that checks to see if they are equal and filter out all results that are true in the visual filter.
If this isn't what you are after please post more details about your model or ideally a PowerBI file withe some representative data adn your current best efforts along with desired output.
read carefully:
"what I need to do is setting up a measure that checks..."
I don't need to create a delta betwenn column 1 and 2, I need to spot differencies, and eventualy it could become a 1/0 field.
Even because advpur is formatted as 60D,7D,3D so it's a text field.
I also know the theory behind this, I sought help to code it, since i'm trying but I'm failing
Anonymous Apoliges I misread it but I'm guess still not 100% sure what your after.
If you getting errors that say you can't do T/F comparison do an if and return "Yes" or "No" which DAX will let you use in a filter statment like CALCULATE([measure],FILTER(table,[ADV Purch Check]="Yes"))
If you are building a visual that will setup the filter context such that you would expect a single value of each of the [ADVPurch] values then try ADVPurch1 = FIRSTNONBLANK(table1[ADVPurch]) and ADVPurch2 = FIRSTNONBLANK(table2[ADVPurch] this will allow you to extract the single value since measures require aggregate functions. Which you can then write a Mesure for ADVPurch Check that checks to see if they are equal and filter out all results that are true in the visual filter.
If this isn't what you are after please post more details about your model or ideally a PowerBI file withe some representative data adn your current best efforts along with desired output.