Working with Slowly Changing Dimensions in Power BI

Working with Slowly Changing Dimensions in Power BI

Guy in a Cube

3 года назад

52,671 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@alexandermilland6674
@alexandermilland6674 - 12.12.2023 17:42

Would love a video about doing some other calculations, like how long was Adam manager of X store?
Especially for an example where you might have multiple columns you are doing SCD2 logic on.

Ответить
@Adam-hy9ou
@Adam-hy9ou - 01.06.2023 18:07

The steps taken to get the surrogate key into the fact table is the only thing missing. So adding the surrogate key based on the From and To dates in the SCD table. Lots of solutions via google but none particularly elegent.

Ответить
@martijnvermeulen3982
@martijnvermeulen3982 - 01.06.2023 04:13

Does the use of views rather than straight tables not break direct-query models?

Ответить
@Hinkakan
@Hinkakan - 17.05.2023 13:27

What if you don't have the surrogate key in the Fact table? How do you do the join? As far as I can tell, you cannot do joins in PowerBI on GREATER/LESS than?

Ответить
@peterfarkas672
@peterfarkas672 - 14.03.2023 16:56

The title is wrong it is not "SCD IN PB" it is "SCD IN SQL". All the issue which pop up with SCD was solved in the source. I have a project where the source is excel, and no chance to make changes before porwer bi. :(

Ответить
@stephiesobgoum
@stephiesobgoum - 22.12.2022 20:17

Merci beaucoup pour cette vidéo Patrick ainsi qu'à la team @GuyInACube
Moi j'ai une autre préoccupation toujours avec la gestion du SCD Type 2 dans POWERBI.

En fait, pour chaque dimension, j'ai un StartDate , un EndDate et un Statut (Actif / Expiré).
Je souhaite sur PowerBI disposer un filtre de date (DateExtraction): lorsqu'une date sera sélectionner, PowerBI devra présenter uniquement les données tels qu'elle se trouvait à cette Date.
Donc pour chaque Mesure dans le table de fait j'ai rajouter à la fonction calculate un filtre qui sélectionne une ligne lorsque la startDate <= DateExtraction < EndDate.

Mais le chargement est extreeeeeeeeeeeeement lonnnnnng, prêt de 5 min pour moins de 150 000 lignes.

En bref, je souhaite afficher les données sur PowerBI selon leurs exact au moment ou leurs insertion dans l'entrepôt de donnée a été éffectué.
Stp Patrick @GuyInACube , y'a t'il une meilleure façon de faire.

Ответить
@dimitridelizee4032
@dimitridelizee4032 - 04.12.2022 05:04

Amazing video. I can't download the examples. I have this message: Account is cancelled and can not accept new subscribers.
Can you make them available again. Thanks

Ответить
@fpa89
@fpa89 - 20.10.2022 22:34

Great work, thanks

Ответить
@sushmita4713
@sushmita4713 - 17.08.2022 07:13

I just messaged about this and this shows up. Not sure if i should be thankful for spying on my data or not

Ответить
@ediths1784
@ediths1784 - 11.08.2022 07:07

How do you handle SCD2 with Dataverse as data source?

Ответить
@shafa7668
@shafa7668 - 11.08.2022 01:15

I gave up mate. I will watch later.

Ответить
@sachin.tandon
@sachin.tandon - 28.06.2022 19:23

Excellent video. I really liked the introduction and context you gave at the beginning of the video, and the way you explained things with clear examples. I'm doing a similar project, and wanted to try and create from source data, a collection of fact and dimension tables using Power Query. However one of the tables I need to create, (or which I think I should be creating, and would like to create) is a Type 2 - S.C.D.. But after doing some web research to find out whether this is possible, and reading some of the best practice documentation on STAR Data Models, on the official Power B.I. site, I've concluded that it's just not possible. So I think I'm going to have to create a dimension table whose primary key is just a composite key of all the attribute fields within it, and then link it the Dimension Table that way to the Fact Table. It would be good to understand though, how to do such a thing properly. But thanks for the video anyway.

Ответить
@TheJustinjet
@TheJustinjet - 27.06.2022 20:10

Really great work! Excellent communicator.

Ответить
@podamaire
@podamaire - 16.01.2022 19:29

why would you need to modify Fact to add new custom store surr key ,instead couldnt you handle in the measure by putting a Case statement ? also custom surr key is needed in dikension, i think we could live only with the Current manager flag ?

Ответить
@Negi_From_Pauri
@Negi_From_Pauri - 23.12.2021 21:58

very funny man

Ответить
@Negi_From_Pauri
@Negi_From_Pauri - 23.12.2021 21:57

Dear Patrick bro you are the collest american power bi God.

Ответить
@geirberge8971
@geirberge8971 - 20.12.2021 17:13

Thank you very much, very helpful. I am struggling to find a good solution with scd2 and hierarchy with the path function. Do you have any suggestions?

Ответить
@adanyoshimoto7504
@adanyoshimoto7504 - 26.11.2021 20:29

Amazing!!!

Ответить
@hrz3942
@hrz3942 - 30.08.2021 04:11

Your Company consists of the regulatory and non regulatory business divisions for which segregated data sets are required due to compliance reasons but high level management, Finance & HR requires combined access to both the divisions. Some of the HR data elements like salary & personal information columns are required to be accessed by HR only. Further for operational reporting, line of business managers require access to their respective areas, general managers to their geographical regions, team leads to their teams and personnel to their own activity reports.
Considering above organizational structure and requirements what are the security models and methods you will suggest to apply for securing reporting and data access?

Anyone have an answer for this?

Ответить
@nigeltufnel4031
@nigeltufnel4031 - 13.08.2021 17:40

SCD, great for DW, challenge for BI. Great stuff here!

Ответить
@dizzyharris2658
@dizzyharris2658 - 17.05.2021 18:56

This was super helpful. I was able to apply this same sort of logic to a different report for "Total IT Tickets open more than 10 days, month over month"

Ответить
@felipefrancisco01
@felipefrancisco01 - 16.04.2021 07:50

that's amazing

Ответить
@WilliamGardnerOrderedSteps
@WilliamGardnerOrderedSteps - 07.03.2021 04:43

Yaa Patrick, super video and a great help, where do we get the code or resources for this please.

Ответить
@lipidsled
@lipidsled - 27.02.2021 17:00

Same video but for Tableau please?

Ответить
@dariuszspiewak5624
@dariuszspiewak5624 - 27.02.2021 12:52

That's again foking bananas :)))

Ответить
@sravankumar1767
@sravankumar1767 - 24.02.2021 09:09

it is new option in power bi But i didn't able to understand. I had seen SCD in SSIS . I was worked on that. It's simple to understand. This is little bit confusion.

Ответить
@koenverbeeck9514
@koenverbeeck9514 - 23.02.2021 20:59

Great video and interesting solution with the calculation group. What I typically do is add another column to the store dimension called "current manager". It has the advantage of not modifying the fact and not adding extra measures (or calculation groups). Users just have to remember to use the correct column to view the manager.

Ответить
@santoshraghunath8133
@santoshraghunath8133 - 23.02.2021 19:33

You are awesome

Ответить
@BryanCampbell888
@BryanCampbell888 - 22.02.2021 17:04

Probably one of the most useful videos you guys have done thus far... It'll be over the head of some folks, and it's a lot to take in, but you keep the length short enough that you can "skim watch" and then "study watch" later... Kudos 👍👍👍

Ответить
@mdhidayat5706
@mdhidayat5706 - 21.02.2021 19:06

Love this Patrick! Hope to see more DW concepts videos that can be used in PowerBI!
Thank you, as always :)

Ответить
@riazuddin7493
@riazuddin7493 - 21.02.2021 17:36

I have a column in my table name reason for leaving and based on that I want to add another column which is Volunteer attrition or Involunteer attrition i.e. if reason for leaving for an employee appears as Retired then the new column should show Involunteer attrition whereas for resignation it should show as volunteer attrition. Can you help me add this column please? Also how can I calculate the percentage of volunteer and involunteer attrition based on the total attrition for the whole year which is 1157.

Ответить
@user-wx3dn3il2f
@user-wx3dn3il2f - 20.02.2021 09:39

great!! and function is littlcel compliacated but amazing

Ответить
@tekezeshewa
@tekezeshewa - 19.02.2021 19:34

Interesting

Ответить
@rqn2274
@rqn2274 - 19.02.2021 18:17

nice video. Btw does anyone know why we are still missing Power BI update from last month?

Ответить
@mytwospence
@mytwospence - 19.02.2021 16:58

Happy to see the Data warehouse toolkit getting a shout-out! Great book for building DW's.

Ответить
@mirinda101
@mirinda101 - 19.02.2021 11:37

Hello Patrick, i just want to mention that for SCD2 (historical) the start date and end date is overlapping. What i mean is that if first manager Adam EndDate is 20210116 for the new manager Patrick it has to be from the next day. I guess you cannot be managers in the same time both of you. Imagine that you query the manager in act for the 20210116 - the result will be both of you - if you query on a range of dates - for example - "select Manager from table where today() between StartDate and EndDate" - and today is 20210116. Anyway, nice videos and useful aswell, great job!

Ответить
@StuartGreenBinkyBMF
@StuartGreenBinkyBMF - 18.02.2021 17:58

Hi Patrick, how would power BI handle an SCD for trending changes, such as an item is either rented, unrented or being repaired? The SCD would log the times in and out of the shop, So you could trend over the year what status the item was in?

Ответить
@leonidiakovlev
@leonidiakovlev - 18.02.2021 14:08

Thanks! It will come handy for me to track the employees moving from one team to another .)

Ответить
@mehdifadhli6413
@mehdifadhli6413 - 18.02.2021 14:01

Thanx Patrick !!

Ответить
@MimouneDJOUALLAH
@MimouneDJOUALLAH - 18.02.2021 11:18

Patrick, you nail it !!!!

Ответить
@micahdail
@micahdail - 18.02.2021 07:33

What if I really really don't want to add another column to my fact? My fact table is already massive as is.

How upset would you be if I kept my SCD as a table related to the fact using a surrogate key, but then calculated my 'current' dimension (current indicator = 1) as an additional table to add to the model as a snowflake? I would  use the SCD alternate key to relate to the (now primary key of the) 'current' table snowflake. Then users that need point-in-time reporting can use the SCD table, and users that need current reporting can use the 'current' table, which will push the alternate key filter from the 'current' table to the SCD which will push the surrogate key filter to the fact.

Again, I know that in ideal world we should avoid snowflakes, but this seems like the most straightforward way of accomplishing it without monkeying my fact. Thoughts?

Ответить
@neverGrowup1224
@neverGrowup1224 - 18.02.2021 02:20

Really nice video! and just wonder if anyhow Guy in a Cube could make more data transformation videos! Now, I am facing a data cleaning question, the business needs to match the first six characters of a data field to another one, after the comparing, the unmatched ones could be modified by hand directly. I have tried PowerBI to extract the characters and use the fuzzy match to filter out the values in data transformation, but then it seems like that Powerbi cannot change the original value, so does it mean the unmatched value has to be changed from the source?

Ответить
@neverGrowup1224
@neverGrowup1224 - 18.02.2021 02:00

great method to use ''userelationship()' function

Ответить
@ysrfan2345
@ysrfan2345 - 17.02.2021 22:36

Great video Patrick! As always thank you.:)

Ответить
@arunt2007
@arunt2007 - 17.02.2021 22:22

Thank you. Excellent video. Column masking based on user login. Any thoughts?

Ответить
@dirkuecker6145
@dirkuecker6145 - 17.02.2021 21:55

Thanks Patrick. I love your way of thinking in terms of where the changes need to happen. Depending on the requirements not all could be solved in the Front end tool, even if it is Power BI. Some things are better to be fixed in the DWH. I love your videos and would love to work with you in a project.

Ответить
@rehanahmed6052
@rehanahmed6052 - 17.02.2021 21:12

I have implemented Scd using SSIS and that was quite easy to do.
Anyways thank you Patrick for the great video!
Surely I'll implement the same in Power BI too..
Cheers

Ответить