Performing Dating Considering Several Fields inside Energy BI Having fun with TREATAS DAX Setting

Performing Dating Considering Several Fields inside Energy BI Having fun with TREATAS DAX Setting

TreatAs is helpful for selection, and it doesn’t filter out just according to you to definitely column, it can filter according to possibly columns you would like. Among the many demands when you look at the Electricity BI dating was performing good matchmaking based on numerous sphere, You will find in earlier times said a method you can use in order to make a substance key and rehearse one towards the matchmaking. Various other experience to utilize TreatAs. Why don’t we see how TreatAs can help where situation.

That is for Understanding, Not Testimonial

As the I’d many questions out-of my first article about TreatAs, I wish to clarify one thing here ahead of we begin;

Even when We told me in the earlier post as you are able to create a virtual relationship having fun with TreatAs, and also in this short article, I am explaining how to come up with a love centered on several fields having fun with TreatAs, These particular play with cases shouldn’t be thought to be my personal recommendation. I simply determine these for the intended purpose of Studying. You will find, needless to say, play with cases to make use of TreatAs, however, this article plus the earlier in the day article is about to explain how the means really works, and so i follow effortless, and simple understand examples.

Test Design

The new shot design that i keeps comes with in order to tables, that to own Get from Videos, plus one to have Sales away from Films, there’s no matchmaking among them tables. This is because those two dining tables should be relevant founded towards several sphere: Name and Year for the for every single table;

I usually recommend from inside the problems similar to this in order to make a provided dimension and rehearse one having filtering both tables, such as everything i explained here. something else entirely that we strongly recommend is to utilize compound keys to manage a love eg what i said here. But for this case, let’s set recommendation away, and you may discuss the learning side of https://datingranking.net/mature-dating-review TreatAs means.

TreatAs Sort out Multiple Columns

We told me the basics of TreatAs setting in the earlier article, and you also learned that TreatAs means a dining table phrase and you may good variety of columns.

Brand new desk term will be go back equivalent level of articles we want to relate to when you look at the TreatAs. I do require the table term to go back the 2 articles Term and you will Score regarding Get table, following make use of the one or two columns Identity and you can Rating in the Sales table once the parameters out-of TreatAs articles.

Just before using TreatAs, basically filter the Existence Terrible occupation from the Transformation table of the Name and Year on Get table, I can score something such as lower than;

You may already know, since there is no relationship to filter out product sales table, it shows the value whatever the Name and you may Year. We have to point out that the brand new Identity and you will Year columns from the Score desk, normally filter out the newest Title and Season articles of one’s Conversion dining table.

Rating desk has both Name and you can Year columns, yet not, it is sold with added articles as you see lower than:

Therefore the Score because the a table phrase output five articles, but I recently need a couple of; you to to own Name, and another to possess Year.

Table Phrase with the exact same Column’s count and you will Same Purchase out-of Columns

There are numerous ways you can write an effective DAX desk term you to production only the several articles need on the Get dining table, SelectColumns is a simple means for one to;

The above term simply return a table which have a few columns; Term and you may Seasons. that it table can be used while the table term of TreatAs function such lower than;

The newest SelectColumns expression output a desk in just a few columns: Name and Year. Then your viewpoints regarding the dining table are widely used to filter out the fresh new beliefs away from subsequent columns of Label and you may Year throughout the Transformation dining table. The transaction out of columns must be the exact same. You can not has actually a desk coming back Identity, Season, right after which filter out the year, Label inside. You truly wouldn’t receive any overall performance with this combination. The name of one’s articles is not important, the prices into the each line try.

However, there is not any relationships between them dining tables, using TreatAs we authored you to definitely matchmaking for it size making use of the a couple of columns; Title and Seasons. The thing is that certain empty values on the results, this is because don’t assume all flick which is on the Rating table can be obtained about Conversion dining table.

Brand new dining table term is come back a table into the precisely the exact same number of the fresh articles with the exact same acquisition of columns which can be found in the menu of articles with the TREATAS means.

If you need to understand the basics of TreatAs means, comprehend my personal writings article right here. Ultimately, this information was outlining a features out-of TREATAS to have training, it is not required even if to help make a romance similar to this; I always highly recommend circumstances like this to create a contributed dimensions and employ you to definitely to have filtering each other dining tables, such as for example everything i said right here. something different that we highly recommend is with compound secrets to would a relationship such everything i informed me right here.

Recommended Posts