Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I'm trying to eliminate unnecessary slicers on my report page by filtering key outputs using measures but am struggling combining multiple AND conditions within the measure.
The scenario is:
Table1: [Transaction_Name][Quantity]
Table2: [Resource_Type][Resource_Description]
I've tried writing the following measure that will output a sum of the [Quantity] column where a) the Quantities are greater than 0 AND the [Resource_Description] in a separate linked table = "Contractors".
This is what I've tried:
Unfortunately I keep getting an error: 'A function 'FILTER' has been used in a TRUE / FALSE expression that is used as a table filter expression'. Have tried a number of different iterations of the expression but can't get it to work with multiple conditions.
I know it should be straight forward but I just can't work out how to apply filters from different tables.
Anyone with any suggestions would be appreciated. Thanks.
Solved! Go to Solution.
@Marcus_E , Try one of three
Measure (Quantity Total) =
CALCULATE (
SUM (Transaction_Name[Quantity]) ,
FILTER(Transaction_Name, Transaction_Name[Quantity] > 0) ,
FILTER(Resource_Type, Resource_Type[Resource_Description] = "Contractors"))
Measure (Quantity Total) =
CALCULATE (
SUM (Transaction_Name[Quantity]) ,
Transaction_Name[Quantity] > 0 && Resource_Type[Resource_Description] = "Contractors")
Measure (Quantity Total) =
CALCULATE (
SUM (Transaction_Name[Quantity]) ,
FILTER(Transaction_Name, Transaction_Name[Quantity] > 0) , Resource_Type[Resource_Description] = "Contractors")
@Marcus_E , Try one of three
Measure (Quantity Total) =
CALCULATE (
SUM (Transaction_Name[Quantity]) ,
FILTER(Transaction_Name, Transaction_Name[Quantity] > 0) ,
FILTER(Resource_Type, Resource_Type[Resource_Description] = "Contractors"))
Measure (Quantity Total) =
CALCULATE (
SUM (Transaction_Name[Quantity]) ,
Transaction_Name[Quantity] > 0 && Resource_Type[Resource_Description] = "Contractors")
Measure (Quantity Total) =
CALCULATE (
SUM (Transaction_Name[Quantity]) ,
FILTER(Transaction_Name, Transaction_Name[Quantity] > 0) , Resource_Type[Resource_Description] = "Contractors")
Thank you, both of these solutions work perfectly.
You are welcome. If my reply helped, please mark it as Answer.
Hi,
Does this work?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |