Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Jeanxyz
Impactful Individual
Impactful Individual

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?

 

values error.PNG

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Jeanxyz ,

 

I have built a data sample:

Eyelyn9_0-1638155653689.png

 

The variable could not be the parameter for VALUES() 

Eyelyn9_1-1638155677155.png

 

You may try to use DISTINCT() :

Measure = 
VAR _t= DISTINCT( FILTER('Table',[Column2]="A"))
VAR _sumx=SUMX(_t,MAX('Table'[Column1]))
return _sumx

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @Jeanxyz ,

 

I have built a data sample:

Eyelyn9_0-1638155653689.png

 

The variable could not be the parameter for VALUES() 

Eyelyn9_1-1638155677155.png

 

You may try to use DISTINCT() :

Measure = 
VAR _t= DISTINCT( FILTER('Table',[Column2]="A"))
VAR _sumx=SUMX(_t,MAX('Table'[Column1]))
return _sumx

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

rbriga
Impactful Individual
Impactful 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])

-------------------------
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!
amitchandak
Super User
Super User

@Jeanxyz , In sumx values you need to give a column, you are giving a table

 

example

Sumx(Values(Table[Column]), [measure])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Jeanxyz
Impactful Individual
Impactful Individual

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. 

 

rbriga
Impactful Individual
Impactful Individual

On your second line, you have an error with VALUES(filter_project).

You must provide a column, not a table.

-------------------------
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!
Jeanxyz
Impactful Individual
Impactful Individual

You can reference a table in values(). 

 

Here is the MS documentation. 

 

https://docs.microsoft.com/en-us/dax/values-function-dax

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors