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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
BIanon
Resolver I
Resolver I

VALUES() as CALCULATE() filter

Hello Community,

I understand that VALUES() returns a distinct one column table.

I also understand that using VALUES() with one filter context and then using that as a filter for a calculation with another filter context will run the calculation only taking the distinct values generated from the first context into account. Hope I'm not far off.

But, I've come across this behaviour which I don't really understand and am hoping someone can explain.

If I do a simple SalesAmt = SUM('FactTable'[SalesAmt]) I obviously just get a simple sum, but if I the do this:
CALCULATE( [SalesAmt], VALUES('FactTable'[CustomerID])) then I get a very different result which I cannot explain to myself

What am I filtering away and why?

3 REPLIES 3
ppm1
Solution Sage
Solution Sage

That is odd. Please share more info about both your model (tables and relationships) and the visual (which fields and measures used in it).

 

Pat

Microsoft Employee

I made a mistake - the measure I am using is not a simple sum but a SUMX()

SUMX( 'FactTable', 'FactTable'[SalesAmt]) * 'FactTable'[Factor] )

I would still like an explanation but I apologize for the confusion

Hi @BIanon ,

 

Here I create a sample and I couldn't reproduce your issue. Please share a sample file with me and show me a screenshot with the result you want. This will make it easier for me to find the solution.

 

Best Regards,
Rico Zhou

 

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.