Skip to content


Undertaking Matchmaking According to Several Fields in the Stamina BI Using TREATAS DAX Function

TreatAs is effective to have filtering, and it also doesn’t filter just considering you to column, it can filter mamba centered on up to articles you would like. One of the demands in Stamina BI relationships was creating a beneficial relationship according to multiple areas, I’ve prior to now said a method you can use in order to make a compound trick and rehearse you to into matchmaking. Other system is to make use of TreatAs. Why don’t we find out how TreatAs will help where condition.

It is for Reading, Perhaps not Testimonial

Just like the I experienced plenty of concerns out of my first blog post regarding TreatAs, I want to clarify anything here ahead of i begin;

Regardless of if We told me in the last blog post you could manage a virtual matchmaking playing with TreatAs, and in this information, I am explaining how to create a relationship based on multiple fields playing with TreatAs, These specific explore cases really should not be regarded as my recommendation. I just determine these with regards to Training. You’ll find, needless to say, explore cases to utilize TreatAs, yet not, this informative article while the earlier in the day blog post is merely planning to determine the form work, thus i heed simple, and easy to learn examples.

Attempt Model

The attempt model that i have has so you can dining tables, one for Get off Video, and another getting Transformation out-of Video, there is no dating between them dining tables. This is because these two dining tables can be related situated into a couple sphere: Label and you can 12 months into the per table;

I always highly recommend during the conditions along these lines to create a shared dimensions and use that to have selection each other tables, such as for example what i told me here. something else that we recommend is to utilize compound keys to manage a relationship instance the thing i explained here. But for this example, let us lay recommendation out, and you may talk about the studying edge of TreatAs setting.

TreatAs Sort out Several Articles

I told me a guide to TreatAs means in the earlier article, and you discovered that TreatAs demands a dining table term and you can an excellent list of articles.

The new desk phrase would be to come back the exact same level of columns we should make reference to for the TreatAs. I actually do need to have the dining table phrase to return both articles Term and you will Rating throughout the Rating table, after which utilize the two articles Term and you may Score regarding Conversion process table given that variables from TreatAs articles.

Prior to using TreatAs, if i filter the fresh Life Gross occupation regarding the Conversion process desk of the Title and you will Seasons regarding Rating dining table, I could score something like below;

As you know, since there is zero link to filter out the sales table, they suggests the well worth long lasting Title and you will 12 months. We should instead declare that the fresh Term and you can 12 months articles out-of the fresh Get dining table, can be filter out this new Title and you may Year columns of one’s Sales desk.

Get desk is sold with both Label and Season articles, but not, in addition, it has some other columns since you see less than:

Therefore, the Score since the a desk expression efficiency four columns, however, I recently need a couple; you to definitely having Name, and something to own Seasons.

Table Term with similar Column’s matter and you may Exact same Order out of Columns

You’ll find several ways you can establish a beneficial DAX desk phrase you to definitely productivity only the two articles you desire regarding Rating desk, SelectColumns is a straightforward way for one to;

The aforementioned expression will only return a dining table that have one or two articles; Title and you will Season. which desk may be used because the table phrase from TreatAs means such as less than;

Brand new SelectColumns expression productivity a desk in just a couple columns: Term and Year. Then the philosophy of desk are acclimatized to filter the fresh thinking regarding next columns of Title and you will 12 months on Transformation desk. The order of columns ought to be the exact same. You simply cannot possess a dining table returning Label, 12 months, then filter out the year, Title inside it. You truly wouldn’t receive any show with that combination. Title of columns is not important, the costs during the per line is.

Even though there is not any dating between the two tables, using TreatAs we composed one to matchmaking because of it size making use of the several articles; Title and Season. You notice some blank philosophy regarding the effect, that is because not all film that’s about Rating table can be found regarding the Transformation dining table.

The fresh new table phrase will be return a dining table into the exactly the exact same level of the brand new articles with the exact same buy of your articles that will be included in the menu of columns to the TREATAS function.

If you like to understand the basics of TreatAs form, read my personal blog blog post right here. Last but not least, this short article is actually explaining an efficiency of TREATAS getting understanding, it is not demanded no matter if to help make a love similar to this; I suggest circumstances in this way which will make a shared aspect and make use of you to definitely having filtering one another dining tables, such as everything i explained right here. another thing which i strongly recommend is by using material secrets to manage a love for example what i said right here.

Сохранить в:

  • Twitter
  • email
  • Facebook
  • Google Bookmarks
  • Yandex
  • Add to favorites
  • BlinkList
  • Digg
  • LinkedIn
  • MySpace
  • PDF
  • Print
  • Yahoo! Bookmarks

Posted in Общее.


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

You must be logged in to post a comment.