Forum Discussion
PowerBI If Then & Conditional Format
Hi, MuthalibAbdul
To compare values in two different tables, you first need to make sure that there is a relationship between the tables. If you don't have a direct relationship that allows for direct comparison, you might consider creating a calculated column that ingests the necessary data into a single table or uses DAX measures to perform the comparison.
You can create a calculated column in either table, preferably the one used for the final visualization, to take the 2024 average and compare it to the 2021 average. Here's a simplified example:
ComparisonResult =
VAR Avg2024 = CALCULATE(AVERAGE(Table2024[Value]), ALL(Table2024))
VAR Avg2021 = CALCULATE(AVERAGE(Table2021[Value]), ALL(Table2021))
RETURN
IF(Avg2024 <= Avg2021, "Low", "High")
If you can, please provide more details with your desired output and pbix file without privacy information (or some sample data)
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.