Forum Discussion
Can't create measurements in DirectQuery?
I've got a directquery instead of a table loaded in. When I try to create measurements it won't let me do it, but I've seen online examples where it works.
If I try to referece (Query1[insert random column]) nothing picks up at all, it picks no columns up in Query1 even though I have hundreds in it. Does anyone know why this is?
- Anonymous5 years ago
Hi Anonymous ,
First error, you will need add a measure name before the formula.
Second error, you can't directly use columns in measure, you will need use SELECTEDVALUE() function to get the column.
For example:
IF(SELECTEDVALUE('table'[column]="value",1,0))Best Regards,
Jay
6 Replies
- HarishKM
Super User
Anonymous Kindly refer this documentation while working on direct query .
few function is not working in DQ at power bi . I will suggest do all the calculation in database itself for more convenient. it will not put extra load as well .
- StefanoGrimaldi
Resident Rockstar
depending in the contest you are using the dax it wont appear unless under a condition its a validated use, you doing the dax for a new column? new table? measure? etc and what you trying to aachive, if you want a faster and better response you would need to give more details.
- AnonymousNot applicable
StefanoGrimaldi Sorry it's a DAX measure I want to create, I want to create a few but they aren't going through at all.
This is the error I'm getting below.
"A single value for column 'Second UPN' in table 'Query1' cannot be determined. This can happen when a emasure formulae refers to a column that contains many values without specifiying an aggregation such as min, max, count, or sum to get a single result."The measures that I want to make don't include min, max, count etc.
- StefanoGrimaldi
Resident Rockstar
you will need to send more details as your measure complete dax and some dummy data of the tables to be able to determine your error over the formula