Forum Discussion
need help with values() formula
I try to run values function over a filtered project table, but I get an error message with the values(). Could someone help?
- Anonymous4 years ago
Hi Jeanxyz ,
I have built a data sample:
The variable could not be the parameter for VALUES()
You may try to use DISTINCT() :
Measure = VAR _t= DISTINCT( FILTER('Table',[Column2]="A")) VAR _sumx=SUMX(_t,MAX('Table'[Column1])) return _sumxBest Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
6 Replies
- AnonymousNot applicable
Hi Jeanxyz ,
I have built a data sample:
The variable could not be the parameter for VALUES()
You may try to use DISTINCT() :
Measure = VAR _t= DISTINCT( FILTER('Table',[Column2]="A")) VAR _sumx=SUMX(_t,MAX('Table'[Column1])) return _sumxBest Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - amitchandakSuper User
Jeanxyz , In sumx values you need to give a column, you are giving a table
example
Sumx(Values(Table[Column]), [measure])
- JeanxyzPower Participant
I don't quite understand your comments, in sumx I am asking to get the max from column [workdays] in the row context provided by values and sum it up.
- rbrigaImpactful Individual
On your second line, you have an error with VALUES(filter_project).
You must provide a column, not a table.
- rbrigaImpactful Individual
VALUES() recieves a table here, when it expects a column.
For example, you can't run VALUES('Customers'), but you something like VALUES('Customers'[Country])