The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello friends,
I thought it was simple but I must be missing something
I have a report that compares columns
In the card I want to show that:
If the number is different then the background will be red
And if the number is the same then the background will be green
This is the measure:
Solved! Go to Solution.
Hi, @netanel ;
I tested for a long time and found that your data are all very long decimals, such as 1.00002 and 1.000015, which are about equal to 1, but they are not equal, so the natural colors are always the same, because they have always been unequal, but they seem to be equal, and you need to change the source data, or round up.
if we change it.
flag =
var _a=ROUND( [Sum OpenQTY]-[Sum OpenQTY Line],6)
return IF( _a<>0 ,"#32CD32","#FF0000")
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @netanel ;
I tested for a long time and found that your data are all very long decimals, such as 1.00002 and 1.000015, which are about equal to 1, but they are not equal, so the natural colors are always the same, because they have always been unequal, but they seem to be equal, and you need to change the source data, or round up.
if we change it.
flag =
var _a=ROUND( [Sum OpenQTY]-[Sum OpenQTY Line],6)
return IF( _a<>0 ,"#32CD32","#FF0000")
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks, that was really the problem
Everything works fine now
Thanks for the quick reply!
If you choose your measure you can and enter the visualizations options you can often change the colors there. That is how I solve that kind of problems.
Is there a reason why you prefer to solve it with Dax?
Hi @ThomasWeppler
Thanks for the response,
Rule Based on one field and I need to base on two fields,
I am trying to display a difference between a column from table A and a column from table B
That is, if a card from table B is different from the card from table A, then the background is red, otherwise it is green
It is impossible to do such a thing in Filed Value
Anway thanks!
Just make a measure based on two values and use that.
Measure = if(table1[column1] <> table2[column2], 1,2)
@ThomasWeppler
This is exactly my Measure in my first Post
Thanks but @v-yalanwu-msft Find the problem and help me to solve the problem!
Hi, @netanel ;
please provide your expected result with backend logic and special examples. It is better if you can share a simplified pbix file.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yalanwu-msft
Thanks for the response
There is a link to the PBIX file in the first message I sent
I also detailed more in the file
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
76 | |
66 | |
52 | |
50 |
User | Count |
---|---|
121 | |
118 | |
77 | |
64 | |
63 |