Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Trying to create a simple measure that displays a comment for a value generated by a measure. The measure calculates a variance number from actual vs. goal. The variance measure is calculating correctly. However, when I try to use IF or Switch functions to show a text comment based on the variance measure's value (number <0 = "Hours are under goal"), the results delivered are not consistent. In some cases the results are as expected but in others there are not. The dashboard shows variances for different relative date periods (month-to-date, year-to-date).
The DAX code is noted below.
Hours_Goal_Comment = SWITCH(TRUE(),[Hours_vs_Goal]<0,"Hours under goal",[Hours_vs_Goal]>0,"Hours exceed goal")
There are other measures used to calculate the Hours_vs_Goal measure so not sure if these are causing the issue. Also tired IF statements and got the same results. Any thoughts on why this is happening would be very helpful.
Problem solved. Thanks.
Hi @bmauro,
If you share your solution here I think it will be help for others who faced the similar issues.
Regards,
XIaoxin sheng
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
76 | |
73 | |
42 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
43 |