Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I have the following code
Missed Deadlines =
SWITCH (
TRUE (),
'Maintenance Ticket System'[Status] = "Critical"
&& 'Maintenance Ticket System'[JobStarted]>1,"Missed",
'Maintenance Ticket System'[Status] = "High"
&& 'Maintenance Ticket System'[JobStarted]>2,"Missed",
'Maintenance Ticket System'[Status] = "Medium"
&& 'Maintenance Ticket System'[JobStarted]>3,"Missed",
'Maintenance Ticket System'[Status] = "Low"
&& 'Maintenance Ticket System'[JobStarted]>5,"Missed"
)
Job Started is a Whole Number and Status is text.
Job Started is a calculated column.
The error message I am getting is.....
DAX comparison operations do not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values.
Any help appreciated.
Solved! Go to Solution.
The solution was because Job Started had a formula using datediff it seeemd to return text, even though the Job Started column was a whole number .. that didnt throw up an error.. however adding VALUE in front of the date diff on the job started column seemed to resolve the issue.
The solution was because Job Started had a formula using datediff it seeemd to return text, even though the Job Started column was a whole number .. that didnt throw up an error.. however adding VALUE in front of the date diff on the job started column seemed to resolve the issue.
Check the types of the columns in Power Query, the issue could be there.
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 |
---|---|
72 | |
69 | |
55 | |
37 | |
35 |
User | Count |
---|---|
85 | |
66 | |
59 | |
46 | |
45 |