0

I haven't used DAX much but I thought this would be easier. Basically I have the value [ID] in the rows of a pivot table using the data model function, and then the values [Numerator],[Denominator], and then a calculated field called [Calc] that is simply [Numerator]/[Denominator].

I would like to create another calculated field that uses different criteria based on the [ID] value in the rows section. This is what I've tried

=SWITCH(
TRUE,
[ID]="Alpha"&&[Calc]>.75,"G"
[ID]="Alpha"&&[Calc]<=.75,"R"
)

The issue is the formula can't evaluate the value of the [ID] field in the rows section, and I'm not sure how to handle this.

1 Answer 1

0

I think the formula you're trying to write would be. If I'm reading this correctly you want to check that both ID = Alpha and the Calc is within the parameter you set:

=SWITCH(
TRUE(),
AND([ID]="Alpha",[Calc]>.75),"G"
AND([ID]="Alpha",[Calc]<=.75) ,"R"
)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.