Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
There seems to be a bug related to the DAX function TRUE() when used in a Calculated table with DirectQuery for Power BI datasets.
Referencing a true/false column in the direct query dataset using the TRUE() function in a calculated table gives incorrect results.
The following example shows how to replicate this issue.
Create a new dataset with only one table and one column that is True/False and contains a few rows of data:
Publish the dataset and create a new file that connects to the previous dataset and change to a local model
Create a calculated table with only one column and one row with this expression and the result is clearly incorrect. Only two rows have the value True but the calculation returns the value 4.
When tracing the query that is generated by the calculated table the issue is obvious as the TRUE() function in the Table expression is translated to the values {true, false} instead of only true.
Changing the expression to count the rows that are true using <> FALSE() instead actually produces correct result as the expression generated to the direct query dataset now only contains the value true
I hope this is enough information so that this issue can be addressed.
BR,
Magnus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.