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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors