Electricity BI when the declaration playing with scale and you will Determine

Electricity BI when the declaration playing with scale and you will Determine

Fuel bi “if report” is simple to make usage of inside the DAX. It truly does work the same as if-else inside SQL. The sentence structure of when the declaration when you look at the dax was

In case your productivity of your analytical_sample holds true, then it screens next factor, and in case it’s false, after that look at the third factor.

It is very important just remember that , one another worthy of_if_real and value_if_false need a similar research method of; if you don’t, it can place a mistake.

You can view the newest beginner “marks” table with assorted articles. We strive in order to make that customized line titled “Groups” on the following dax phrase.

DAX nested when the statement inside Fuel BI

Let’s proceed to the advantage bi nested in the event that report implementation. We will see a similar study dining table that you have viewed significantly more than.

Contained in this dax algorithm, we have made use of a couple in the event the comments. First, we’re evaluating should your obtained marks line possess an admiration regarding less than sixty. It will return grade C. In the event the conditions go back false, after that we are composing once more an extra if declaration one assesses in the event that “acquired scratching” try below 70, this may be reveals amount B if not degrees An effective as you can see less than.

Once we got mentioned before, the details particular “true” and “false” regarding the if report ought to be the same; or even, it will toss an error.

Now within formula, i have some other studies models (text message and you can integer) having “true” and you may “false” beliefs. We’re going to have the pursuing the mistake

In the event that declaration with analytical operators for the DAX

It formula claims if for example the “Gotten marks” is greater than 65 and you will sufferers is actually equal to “Computer”, “Math” otherwise “Physics” it will show “CS Group” if not it can let you know “Non CS Category”.

We could use a dual pipe operator or “OR” user from the if the report. We have a regulation as soon as we have fun with “Otherwise operator.”

Which algorithm tend to create a blunder “A lot of objections was indeed enacted towards the Or form. Maximum conflict amount toward form try dos.” On Or mode, we can only admission several variables, however if we are in need of more one or two criteria, next we should instead fool around with a dual tube agent as the less than.

Strength BI key setting within the dax

The first parameter of the option mode are an expression. You can give a term that develop scalar worth.

The third factor is an effective “result.” If the “value” parameter is actually matched up with the result of an expression, it displays the newest “result” or even, it is with other fits or perhaps in the brand new otherwise region.

I’ve offered sufferers once the an expression to your button means. After that, the audience is checking the values on subject line. If for example the well worth is equal to “Physics,” this may be tend to display “Py.” In the same way, it can line by the line and take a look at key function for each subject. In the event the no subject matches, then it will go regarding otherwise area and you may screen “Unkown.”

Button mode into the DAX with Real()

Why don’t we make key function a little more cutting-edge. We could create a good dax formula to demonstrate scratches to possess desktop and you can math. New requirements try that when the topic are mathematics and you may display its gotten marks as it. When your topic is actually a pc, then very first, it inspections in case the midterm marks towards computers try greater than just 15 then screens the gotten marks.

Here you will find provided the original parameter is actually “True().” It indicates, regardless, the first phrase is true, and it also is true of examining several standards.

The good thing is we are able to mix conditions using various other operators, and also in the outcome factor, we are able to play with one line otherwise size.

when the statement in scale energy bi

Many people not able to explore in the event the report for the dax steps. It can be user friendly when the report into the dax electricity bi actions.

Let us explore countif locate the individuals victims for every scholar where acquired scratching for each subject try higher than 60.

Here we have put countx setting and pass the original parameter as a filtration means. sugar daddy Montreal That it filter mode tend to go back a desk in which gotten scratches was more than sixty. Countx function commonly iterate a desk which is came back because of the filter out setting and apply relying on the niche column.

Fundamentally, we will drag pupils plus the “Topic matter” scale with the declaration, as you can tell below.

Now we want further bore down and try to get ladies children only. We require all females youngsters which have people subjects in which received marks is higher than 60.

I’ve given [Topic count] size because a phrase so you’re able to assess setting and College student sex = “F” since a filter. This may give us “topic number” simply for people people, as you can plainly see lower than.

I’ve given conditions to help you if the function as “topic matter” size. If the subject matter try higher than step 3, this may be often get back other scale entitled “Females students” or even, it will get back an empty.

Deixe uma resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *