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'm trying to calculate some criteria in a column using "if" condition(looping), but it's only checking the first "if" condition and giving the single value (IF([% of Assets added during the Quarter] >= 5, 5,).
When I'm using the same formula in the measure column then it is working correctly.
After creating criteria I have to find out an average of it also.
--------------------------------------------------------------------------------------------------------------------
DAX Formulas for Criteria: Avila Score Crit = IF(ISBLANK([% of Assets added during the Quarter]), BLANK(),
IF([% of Assets added during the Quarter] >= 5, 5,
IF(AND([% of Assets added during the Quarter] < 3.5, [% of Assets added during the Quarter] > 5),3,
IF([% of Assets added during the Quarter] <=3.5,1))))
----------------------------------------------------------------------------------------------------------------------
Avila Score is "Measure" and after this is "Column".
Hi being_mohit16,
I'm still a practicianer in DAX. I'm having trouble following your inquiry (your question).
If you have two conditions that need to be met, instead of using IF, you can try SWITCH with AND. SWITCH for me is easier, but I have occasions when I still use IF.
Column Name =
SWITCH (
TRUE () ,
AND (
logic test 1 = "what your looking for",
logic test 2 = "what your looking for"
)
= TRUE(), result if true,
result if falseI
)
I tested the formula above on a data set I'm using and it worked. It looked like this:
Hello,
One more thought. DAX does not accept a table as a measure. If your DAX code results in what would end up being a talbe, if you write it as a measure you'll get an error. Nevertheless, you can use a table in a measure as a filter function that then aggregates the filter context.
Good luck.
RM
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 |
---|---|
13 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |