Forum Discussion
Compare two measures
Hi,
Guys, i have create two measures calculating the sum of two column from the same table.
What i want is to compare the value and if it is the same to receive "Y" else "N" . I have already create a column with an if statement but i have read that due to the fact that measures are dynamic the column will not perform the output i want.
Is there any suggetion?
Hello aloxaz
it will depends on the logic you want to achieve.
you can also create a third measure ( measure 3 = [measure1] = measure[2]) with the if statment you want.
this measure will be dynamic base on the filters applied to the page which could be more convenient and more flexible for you .
so example if you have a visual table : with categories : A , b ,c
categories
A
B
C
measure 3 will work base on the filter context . so measure 3 for A , will calculate measure1 for A and measure2 for A and then check if they are equal . and returning Y/ N base on your condition .
however, if you want to use the Y/N as a slicer, then yes a calculated column would the way to go .
let me know if there anything i can help you with.
If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. Dont forget to hit that thumbs up button 🫡👍
2 Replies
- Daniel29195Community Champion
Hello aloxaz
it will depends on the logic you want to achieve.
you can also create a third measure ( measure 3 = [measure1] = measure[2]) with the if statment you want.
this measure will be dynamic base on the filters applied to the page which could be more convenient and more flexible for you .
so example if you have a visual table : with categories : A , b ,c
categories
A
B
C
measure 3 will work base on the filter context . so measure 3 for A , will calculate measure1 for A and measure2 for A and then check if they are equal . and returning Y/ N base on your condition .
however, if you want to use the Y/N as a slicer, then yes a calculated column would the way to go .
let me know if there anything i can help you with.
If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. Dont forget to hit that thumbs up button 🫡👍
- AnonymousNot applicable
Hii aloxaz , this is happening because there are other columns in the database and they have different values. Where as the measure are a dynamic sum. So for that you'll have to be more specific about the filters. Say, what exact filters you want. I hope this will solve your problem. Please let me know if you have any doubt.