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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

The expression contains multiple columns, but only a single column can be used in True/False

Hi, I'm trying to complete a formula in DAX with some filters in it and a final one in which I want to verify two condition regarding a date field: one is a boolean ('F - Inventory'[Physical date]="1900-01-01") and the other one contains an aggregate function ('D - Date'[Date]<=MAX('F - Inventory'[Physical date]). I would like to include them in an OR condition, but it appears to be wrong: "The expression contains multiple columns, but only a single column can be used in a True/False expression that is used as a table filter expression.". What I'm trying to do is simply to sum the values of [Trans Amount Mst] field that have those fields in related dimension tables. How can I include the last filter in the right way?

 

In Acq Vib Uni = CALCULATE
(
SUMX('F - Inventory','F - Inventory'[Trans Amount Mst]),
'F - Inventory'[Transaction type]="Ordine fornitore",
'D - Warehouse'[Warehouse ID]="B0",
'D - Item'[SpecialUnificato]="Unificato",
OR('F - Inventory'[Physical date]="1900-01-01", 'D - Date'[Date]<=MAX('F - Inventory'[Physical date]))
)
 
2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try like

In Acq Vib Uni = CALCULATE
(
SUMX('F - Inventory','F - Inventory'[Trans Amount Mst]),
'F - Inventory'[Transaction type]="Ordine fornitore",
'D - Warehouse'[Warehouse ID]="B0",
'D - Item'[SpecialUnificato]="Unificato",
Filter('F - Inventory', OR('F - Inventory'[Physical date]= date(1900,01,01), 'F - Inventory'[Physical date] <=max('D - Date'[Date]))
)

 

or

 

In Acq Vib Uni = CALCULATE
(
SUMX('F - Inventory','F - Inventory'[Trans Amount Mst]),
'F - Inventory'[Transaction type]="Ordine fornitore",
'D - Warehouse'[Warehouse ID]="B0",
'D - Item'[SpecialUnificato]="Unificato",
Filter('F - Inventory', OR('F - Inventory'[Physical date]= date(1900,01,01), 'F - Inventory'[Physical date] <=max('F - Inventory'[Physical date] ))
)

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
Anonymous
Not applicable

@amitchandak hi,

I don't think is the same thing I want... Why we take the max value of 'D - Date'[Date]? The meaning of what I'm trying to do is:

I want to take all the rows in which physical date values is bigger than my date analysis (in my visual I put 'D - Date'[Date] as first column and for each day of  'D - Date'[Date] I want to show the sum of that calculation of the rows who have 'F - Inventory'[Physical date] bigger than the date of the row in the visual)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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