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.
I am trying to add a custom flag value through a measure but it is returning multiple rows with blank metric value.
Here is a simple scenario -
We have two rows for this Business Class, Customer Segment combination in our database for metric Total Amount Paid
Now we try to add a Flag value of Calculated Measure
We get the right result but the report seems to bring in all combination of Dimensions Business Class and Customer Segment with blank Total Amount values.
How do we get just the rows relevant with Metric values and suppress the blank metric rows?
Solved! Go to Solution.
Hi,
You can expand the filter pane and add a condition of 1 for that measure.
Hi @nbitabc
A quick fix is to add a condition that [Total Amount Paid] is nonblank, and also use a variable to avoid repeated evaluation:
Service_Flag =
VAR TotalAmountPaid = [Total Amount Paid]
RETURN
IF (
NOT ISBLANK ( TotalAmountPaid ),
IF (
MAX ( BUSINESS_CLASS[Business Class] ) = "Auto Service Station"
&& MAX ( CUSTOMER_SEGMENT[Customer Segment Code] ) = "MOTORCYCLE_POWERSPORT_DEALER"
&& TotalAmountPaid > 10000,
1,
0
)
)
I suggest putting this condition in an outer IF to avoid evaluating the existing expression unless necessary.
Does this work for you?
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 |
---|---|
105 | |
105 | |
88 | |
73 | |
66 |
User | Count |
---|---|
124 | |
113 | |
98 | |
81 | |
72 |