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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jr3151006
Helper IV
Helper IV

DAX Help - how to add another condition on the current filter

Hi,

can someone help me to add a second condition filter??
I tried many time in different ways but no sucess.

 

MeasureXYZ = CALCULATE(
			DISTINCTCOUNT ( TABLE1[Número] ),
							FILTER(
								VALUES(
									TABLE1[Date]),TABLE1[Date]=CALCULATE([Measure-LatestDate],all(TABLE1[Date]))))

 

 

I need also add the following 'FIELD' + 'Condition' as bellow:

 

TABLE1[Consider]="Inativo"

 

 

3 REPLIES 3
Anonymous
Not applicable

Hi  @jr3151006 ,

 

According to the error message you provided:

A single value for collumn 'Consider' in table TABLE1 cannot be determined.

I think the problem is caused by the field 'Consider' in table TABLE1 not outputting a unique value in the current context of your metric, and after checking your code, I think the problem is in this code snippet.

TABLE1[Date]=CALCULATE([Measure-LatestDate],all(TABLE1[Date]))

If it is convenient, you need to make sure that the parameter [Measure-LatestDate] placed here is a metric or a calculated column? If it is a calculated column, you need to avoid the error by nesting the functions as described in the error description, and if it is a metric, then we can make sure that the output of the metric is an aggregate value, and you can upload the source data to us to check the problem in detail.

Refer to:

MINX function (DAX) - DAX | Microsoft Learn

MAXX function (DAX) - DAX | Microsoft Learn

SUMX function (DAX) - DAX | Microsoft Learn

COUNTX function (DAX) - DAX | Microsoft Learn

 

Best Regards,

Liu Yang

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

vicky_
Super User
Super User

use the && in the filter condition.

So it would look something like CALCULATE(... FILTER(VALUES(Table), condition1 && condition2))...

oh no....

A single value for collumn 'Consider' in table TABLE1 cannot be determined. This can happen when a measure formula refers to a collumn that contais many values without specifying an aggregation such as min, maxm countm or sum to get a single result

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.