Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
Im fairly new to Power BI and trying to build my own report/visual dashboard.
I have 1 dataset where i want to insert IF formula to compare if column A is greater than column B then return 1 else return 3.
Ultimately want to use the results of this to create a traffic light using UNICHAR function.
However when doing the IF formula, it returns 3.10 where statement is true and blank where statement is false.
Solved! Go to Solution.
Hi majmsk
Please consider one of these solutions and leave kudos
Method 1)
Add a conditional column in you M query
Method 2)
On the top menu bar>Click on Modelling>New measure and add these measures
Total last = SUM(YourTableName[Last])
Total current = SUM(YourTableName[Current])
Your flag = IF([Total current]>[Total last],1,3)
Hi @Anonymous ,
You can try this measure.
Measure =
SWITCH(
TRUE(),
MAX('Table'[Last]) < MAX('Table'[Current]) , "3",
"1"
)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hi @Anonymous ,
You can try this measure.
Measure =
SWITCH(
TRUE(),
MAX('Table'[Last]) < MAX('Table'[Current]) , "3",
"1"
)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
@AnonymousHi , Can you please send the sample file. It looks like some formatting issue
Hi majmsk
Please consider one of these solutions and leave kudos
Method 1)
Add a conditional column in you M query
Method 2)
On the top menu bar>Click on Modelling>New measure and add these measures
Total last = SUM(YourTableName[Last])
Total current = SUM(YourTableName[Current])
Your flag = IF([Total current]>[Total last],1,3)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
106 | |
78 | |
72 | |
67 |
User | Count |
---|---|
141 | |
107 | |
100 | |
82 | |
74 |