August 31, 2017 at 3:03 pm
I have a situation in which a dimension is not returning data as wanted. I sort of know why but don’t know the proper fix. Here is the scenario.
When running this dimension, results will NEVER appear if the SS_ID is null in the Fact Table. Even if there is a valid CTP FK in the Fact table.
Are there any options other than putting fake Sub Specialties for Clinical Training Programs that don’t have Sub specialties in the Dim_TSS_SubSpecialty table? Example Registered Nurse does not have a sub specialty so I would just put “No Sub Specialties for this Program” in the Dim_TSS_SubSpecialty table and on and on. This would NOT fix the issue of them not answering that sub specialty question. And I can’t put unknown(s) in the Dim_TSS_SubSpecialty table because it is a child of the Dim_TSS_TrainingProgramClinical table.
September 1, 2017 at 7:03 am
Hi David,
I'm not sure I follow all the relationships, but SSAS MD does inner joins on everything even if it's not in the query. That's why the rows with null are not showing. Can you flatten those two dimensions into one dimension? Otherwise, the unknown row or no values row, whatever you want to call it, would be the solution.
-Brian
September 1, 2017 at 7:10 am
Thanks Brian:
I think your statement “SSAS MD does inner joins oneverything” answered my question. That’s exactly the problem. I was hoping there was some way to make that dimension work like an outer join on those 2 tables.
September 1, 2017 at 7:44 am
If there is a way to do that, I think it would be in coding the measures. Unfortunately, that's beyond my skill level in MD at the moment.
September 1, 2017 at 9:59 am
david.bernett - Thursday, August 31, 2017 3:03 PMAre there any options other than putting fake Sub Specialties for Clinical Training Programs that don’t have Sub specialties in the Dim_TSS_SubSpecialty table? Example Registered Nurse does not have a sub specialty so I would just put “No Sub Specialties for this Program†in the Dim_TSS_SubSpecialty table and on and on. This would NOT fix the issue of them not answering that sub specialty question. And I can’t put unknown(s) in the Dim_TSS_SubSpecialty table because it is a child of the Dim_TSS_TrainingProgramClinical table.
It's actually a common practice to have rows in dimensions to represent the unknown, not applicable, or no-match cases:
http://www.sqlchick.com/entries/2011/5/16/usage-of-unknown-member-rows-in-a-data-warehouse.html
Is there a reason you were trying to avoid that? You typically don't want a fact record that has a NULL value for a dimension key.
September 1, 2017 at 2:19 pm
Thanks Chris:
I did end up putting rows in the Sub Specialties table for each Training Program. For Registered Nurse for Example, I just put Registered Nurse and so on for those who don't have a Sub-Specialty. I read the article link you sent me and this all makes sense.
For those who Answered the Clinical Training Program but did NOT answer the Sub-Specialty (if there was one), I'll probably just delete completely from the Fact table as I don't consider that a valid survey.
Just didn't know if there was a better way.
Thanks again.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply