Forum Discussion
Power BI | Slicer Filter | Summary Table generation
- 5 years ago
You need to create dimension tables that hold the unique values for ID and Type that you link to your fact tables, then you can use measures to summarize your data. You can use DAX to create the tables:
IDs = DISTINCT( UNION( DISTINCT('Table 1'[ID]), DISTINCT('Table 2'[ID]) ) )Types = DISTINCT( UNION( DISTINCT('Table 1'[Type]), DISTINCT('Table 2'[Type]) ) )Then create the relationships like this.
Then some measure to do the sums and add the type (from your types table) to a visual. In my sample I put the measures on the IDs table but you can put them on whatever table you want.
I have attached my sample file for you to look at.
You need to create dimension tables that hold the unique values for ID and Type that you link to your fact tables, then you can use measures to summarize your data. You can use DAX to create the tables:
IDs =
DISTINCT(
UNION(
DISTINCT('Table 1'[ID]),
DISTINCT('Table 2'[ID])
)
)Types =
DISTINCT(
UNION(
DISTINCT('Table 1'[Type]),
DISTINCT('Table 2'[Type])
)
)
Then create the relationships like this.
Then some measure to do the sums and add the type (from your types table) to a visual. In my sample I put the measures on the IDs table but you can put them on whatever table you want.
I have attached my sample file for you to look at.
Thanks a lot for the solution. It works fine. But can you suggest how to do the same if we only have 1 table by merging Table 1 and Table 2. And we want to achieve the same goal of summarizing Data based on Type.