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

SUM all except certain Prod. ID in period

Hi

Struggeling to measure sales on a group of articles. I have a period of sales but for the first week i want to exclude two products. Wanting this to be a measure, and tried a few but ended with a calculated column, since i kept getting stuck. 

The Column looks like this atm:

 

Qty sales x 24 pk = IF(
Date[Date]<="21.10.2019"
&& Date[Date]>="26.10.2019",
IF(
'Product[Product Id]="131313"
&& Product[Product Id]="131314",
0,
Data[Sales_Quantity]
))​
 
Get an error saying: "dax doesn't support comparing values of type Date with values type Text"
 
All help is much appreciated 
1 REPLY 1
Anonymous
Not applicable

The error is clear. You cannot compare values of different types. Dates must be compared to dates, numbers to numbers and text to text. Easy as that.

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.