Forum Discussion
DAX Comparision operators do not support comparing values of type Integer with values of type TEXT
I have a measure named Preview Time based on below calculations. However, when I try to throw this measure on the matrix visual it then complains of below error. The datatype etc seem to be all correct, I have also applied the TRIM and CLEAN power query functions to remove any special characters or spaces etc before doing the calculation.
Any idea where could be the problem etc
- Anonymous2 years ago
Hi, Anonymous
May I ask if this is the expected output you are looking for? Based on your description, I have created a measure to achieve the effect you are looking for. Following picture shows the effect of the display.
Measure:
Preview Time = DIVIDE ( CALCULATE ( SUM ( FactDGOutboundAgentSIH[Propertyvalue] ), FILTER ( FactDGOutboundAgentSIH, FactDGOutboundAgentSIH[propertyname] = "PreviewTime" ) ), 3600 )If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
2 Replies
- gmsamborn
Super User
Hi Anonymous
The problem is you are comparing propertyvalue (integer) and the string "PreviewTime".
- AnonymousNot applicable
Hi, Anonymous
May I ask if this is the expected output you are looking for? Based on your description, I have created a measure to achieve the effect you are looking for. Following picture shows the effect of the display.
Measure:
Preview Time = DIVIDE ( CALCULATE ( SUM ( FactDGOutboundAgentSIH[Propertyvalue] ), FILTER ( FactDGOutboundAgentSIH, FactDGOutboundAgentSIH[propertyname] = "PreviewTime" ) ), 3600 )If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum