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.
Hey,
I have a query regarding a DAX statement to determine if one value is greater than the other in a matrix. One column contains one value (4.00) and the other contains a number of values (1, 3, 2000)
I am trying to determine the best way of seeing if the value in column A is greater than those in column B, if it is, give it a 1, else 0. I have achieved this, but the problem is, before filtering on LOD and GAC, it doesn't seem to work:
When I add a filter on to show only 1 and 3:
It works! But why? The query I am using is below:
ExceedCheck =
VAR GAC =
MAXX (
ALLSELECTED ( 'Overall Query'[GAC]),
CALCULATE (
MAX ( 'Overall Query'[GAC] )
)
)
VAR LOD =
MAXX (
ALLSELECTED ( 'Overall Query'[LOD]),
CALCULATE (
MAX ( 'Overall Query'[LOD] )
)
)
RETURN
SWITCH (
TRUE (),
NOT ISBLANK ( LOD ) && NOT ISBLANK ( GAC ) && LOD >= GAC, 1,
0
)
Hi @Anonymous
Can you share the actual pbix, or one with dummy data the reproduces the problem?
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
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 |
---|---|
43 | |
20 | |
18 | |
16 | |
15 |
User | Count |
---|---|
49 | |
26 | |
22 | |
17 | |
16 |