Forum Discussion
DAX - if/then giving error about integer values, when there are none?
- 6 years ago
Hello @grggmrtn
Try this.
Frekvens Filter = VAR __isWeek = RELATED( 'nexus2 Dim_Frekvens'[Hver x] ) = "WEEK" VAR __isIn = RELATED( 'nexus2 Dim_Indsats'[Indsats navn] ) IN { "R1 - Rengøring*", "VP - Tøjvask*" } RETURN IF ( __isWeek && __isIn; "OK"; "NOT OK" )Best regards
Mariusz
If this post helps,then please consider accepting it as the solution.
Please feel free to connect with me.
Linkedin
Hi grggmrtn ,
Please check and modify the data type of these fields involved.
You can also use FORMAT function with these fields.
If the problem persists,could you please share sample pbix with dummy data?
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi V-lianl-msft
The data type of all fields has been checked.
Dummy data shouldn't be necessary. There are three simple tables - 1 fact table with only key columns for each dimension, and two dimensions that have their respective key columns (values in them are integers, but I'm not using they keys in my code), and another column with the text values that I'm trying to compare.
Yes, I could use FORMAT, I'm just trying to figure out what integers Power BI thinks I'm using here?