Forum Discussion
Passing values to another page using drill trough
I have a field parameter slicer in Power BI set to multi-select mode. The slicer includes metrics like Canada_Profit, France_Profit, Germany_Profit, Maxico_Profit. Same using in newcard.
On the source page, I display a card visual showing the selected field parameter dynamically. When I drill through to a second page, I want to pass the selected card's country(e.g., "Canada" or "France") to display its information dynamically on the drillthrough page.
From:
To:
Hi Tan008
To pass the selected country from your field parameter slicer to a drillthrough page, follow these steps:
- Create a Country Table: List all countries (e.g., Canada, France).
- Unpivot Your Data: If your data has separate columns for each country's profit (e.g., Canada_Profit, France_Profit), unpivot it in Power Query to have a "Country" and "Profit" column.
- Set Relationships: Link the Country table to your unpivoted data on the Country column.
- Create a Measure: Use a measure to select the appropriate profit based on the country:
************************************************
text
Selected Profit =
SWITCH(
TRUE(),
SELECTEDVALUE('YourCountryTable'[Country]) = "Canada", SUM(YourTable[Canada_Profit]),
SELECTEDVALUE('YourCountryTable'[Country]) = "France", SUM(YourTable[France_Profit]),
BLANK()
)
************************************************- Configure Drill through: Add the "Country" field from your Country table to the drillthrough filters on your drillthrough page.
- Update Visuals: Use the "Selected Profit" measure in your visuals on both pages.
This setup allows dynamic filtering based on the selected country and ensures proper drillthrough functionality. Let me know if you need further assistance!
If the above information helps you, please give us a Kudos and marked the Accept as a solution.
Best Regards,
Community Support Team _ C Srikanth.
3 Replies
- Deku
Super User
You would need to use the new card visual, with small mutilples by country, with a profit measure. Then you will have a country filter context that can be used for drillthrough
- Tan008New Member
Deku I tried your suggestion, but it’s not working. I have a field parameter slicer that I’m also using on new cards, which are created dynamically based on measures. On Page 2, I need to set up drillthrough functionality to pass the individual measures so that Page 1 can successfully drill through to Page 2.
- v-csrikanth
Community Support
Hi Tan008
To pass the selected country from your field parameter slicer to a drillthrough page, follow these steps:
- Create a Country Table: List all countries (e.g., Canada, France).
- Unpivot Your Data: If your data has separate columns for each country's profit (e.g., Canada_Profit, France_Profit), unpivot it in Power Query to have a "Country" and "Profit" column.
- Set Relationships: Link the Country table to your unpivoted data on the Country column.
- Create a Measure: Use a measure to select the appropriate profit based on the country:
************************************************
text
Selected Profit =
SWITCH(
TRUE(),
SELECTEDVALUE('YourCountryTable'[Country]) = "Canada", SUM(YourTable[Canada_Profit]),
SELECTEDVALUE('YourCountryTable'[Country]) = "France", SUM(YourTable[France_Profit]),
BLANK()
)
************************************************- Configure Drill through: Add the "Country" field from your Country table to the drillthrough filters on your drillthrough page.
- Update Visuals: Use the "Selected Profit" measure in your visuals on both pages.
This setup allows dynamic filtering based on the selected country and ensures proper drillthrough functionality. Let me know if you need further assistance!
If the above information helps you, please give us a Kudos and marked the Accept as a solution.
Best Regards,
Community Support Team _ C Srikanth.