Forum Discussion
GaryK
9 years agoFrequent Visitor
Visualization Interactions - Is this possible?
I'm very new to Power BI and am struggling with getting teh result that I need... Basically, I have 2 tables/datasets - SUMMARY and DETAIL. There is no 1-1 mapping/relationship between the 2 tab...
- 9 years ago
You can do some transforms for your SUMMARY table in Query Editor. Then you can get your desired result directly.
- Duplicate the DETAIL table, rename it to SEQ, delete the Value column.
- In SUMMARY table, add custom column as below.
- Expand the custom column.
- Add another custom column with following formula. Change the data type of these two columns to Whole Number.
if [Custom.SEQ] >= [Start_SEQ] and [Custom.SEQ] <= [End_SEQ] then [Custom.SEQ] else 0
- Filter the Custom column, only show rows do not equal 0.
- Remove the Custom column.
- Close and apply Query Editor, create relationship between DETAIL and SUMMARY with SEQ and Custom.SEQ key.
- We only need to drag columns into charts. Table chart will be filtered since there is proper relationship between them. I’ve also upload my PBIX file here for reference.
Best Regards,
Herbert
- Duplicate the DETAIL table, rename it to SEQ, delete the Value column.
v-haibl-msft
9 years agoMicrosoft Employee
You can do some transforms for your SUMMARY table in Query Editor. Then you can get your desired result directly.
- Duplicate the DETAIL table, rename it to SEQ, delete the Value column.
- In SUMMARY table, add custom column as below.
- Expand the custom column.
- Add another custom column with following formula. Change the data type of these two columns to Whole Number.
if [Custom.SEQ] >= [Start_SEQ] and [Custom.SEQ] <= [End_SEQ] then [Custom.SEQ] else 0
- Filter the Custom column, only show rows do not equal 0.
- Remove the Custom column.
- Close and apply Query Editor, create relationship between DETAIL and SUMMARY with SEQ and Custom.SEQ key.
- We only need to drag columns into charts. Table chart will be filtered since there is proper relationship between them. I’ve also upload my PBIX file here for reference.
Best Regards,
Herbert
GaryK
9 years agoFrequent Visitor
Thanks Herbert_Liu for taking the time to provide detailed expanation and screenshots.
My data is more complex than the simple scenario that I provided, and I must admit I struggled a bit with you implementing your solution into my real world scenario, but I got there in the end.
Cheers
Gary