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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors