Forum Discussion
Table set-up - Union into one table
- 3 years ago
Hi , aashton
According to your screenshot,I see you have created the dimension table.For this table is used for the columns headers . And you put the right place,the row header is used by the fact table.
For your need ,we do not need to create relationship between the dimension table and the fact table.
Instead we need use the measure to get the value without relationships between tables.You do not worry about you get an error code when you put this three fields on the visual,we just need to create a measure to put on the value field so the error code will disappear!
And the dimension table is created by which fields you need to put on the column headers,in my test data ,they are “application count,contracts count,other measure ,other measure 2”.You need to modify this dimension table in your side based on your situation.
And then you can see the [Measure],this is to get the value based on the column headers,you also need to modify this measure based on your situation!
The [Measure2] is used for the drill through due to now when we drill through we convert the [Type] field instead of the [Table],so we need to create a new measure to transfer this filter to what we want !Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
And, when I drill-through to the details page, is there a way to show the ID, Name, Application Source and Contracts Source like below? So for example, if I do drill-through on all of Agency applications, I will see the list of applications, and if that ID does have a Contract, it will also list the Contract Source. Since it is filtering on Table it is only showing one or the other.
Hi , aashton
Thanks for your quick response!
This is my understand for your question:
(1)For the matrix , if you have other measures before,So you need to rewrite these measures to adapt to the new table structure. This is inevitable, and modifying the table structure and filtering context definitely requires rewriting the measures.
(2)Do you mean when you drill through the one of the Source in Application/Contracts, you want to show the table filtered by it and display the other column to show the Contracts/Application's Source name according to the every ID?
If this , we can create two measures like this to put in the table visual:
Application Source = CALCULATE(MAX('Lead Application Contract Sources'[Source] ) , 'Lead Application Contract Sources'[ID] = MAX('Lead Application Contract Sources'[ID]) ,'Lead Application Contract Sources'[Table]="Applications" ,ALL() )
Contacts Source = CALCULATE(MAX('Lead Application Contract Sources'[Source] ) , 'Lead Application Contract Sources'[ID] = MAX('Lead Application Contract Sources'[ID]) ,ALL() )
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- aashton3 years agoHelper V
v-yueyunzh-msft I apologize for the late response, but yes that is exactly what I want it to do. However, I can't get the Applications Source or Contracts Source columns to work. Applications Source is blank for all of them, and Contracts Source is the same for all of them:
Application Source = CALCULATE(MAX('Lead Application Contract Sources'[Source Category]) , 'Lead Application Contract Sources'[Candidate ID] = MAX('Lead Application Contract Sources'[Candidate ID]) ,'Lead Application Contract Sources'[Table]="Applications" ,ALL() )Contacts Source 2 = CALCULATE(MAX('Lead Application Contract Sources'[Source Category] ) , 'Lead Application Contract Sources'[Candidate ID] = MAX('Lead Application Contract Sources'[Candidate ID]) ,'Lead Application Contract Sources'[Table]="Contracts",ALL() )- v-yueyunzh-msft3 years agoCommunity Support
Hi , aashton
Thanks for your quick reponse! And i am sorry for that this can not help you solve the problem.
This may be a problem caused by different contexts, but I don't have your test data so it's hard to tell what the problem is. If it is convenient, can you provide me with some test data (which does not contain sensitive data and can reproduce your problem), and then provide me with the expected results you want in a table form, so that I can help you better?
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- aashton3 years agoHelper V
Hello v-yueyunzh-msft !
So I did get the 2 measures to work, Applications Source and Contract Source. The drill-through is still kind of funny, sometimes it shows records from a different source than the one I clicked on...still trying to work that out. But I have a second part of this I am trying to figure out. See attached I've created two measures, for Application Count and Contract Count. I need to display these in a matrix by source. I've put these 2 new measures on Page 2 for the drill-throuh....However, when drill-through on the matrix, it only brings the filter of the source not the tables. So if I click on Agency Application Count of 5, it shows the 5 Application, plus any contracts with the source of Agency. Is there a way to get it to filter on the table and source?
https://drive.google.com/file/d/1ZCASD5RnFeqP_lO-da_qdVS7q_zvi7tb/view?usp=sharing