Forum Discussion
Enable conditional drillthrough
- Anonymous1 year ago
Hi, lavankumar1989a
Thanks for the reply from Uzi2019, anmolmalviya05 and 123abc. You can put the measure to Filters pane to enable filtering.Flag = VAR _slicer = SELECTEDVALUE ( Slicer[Year] ) VAR _startYear = _slicer - 1 VAR _tableYear = SELECTEDVALUE ( 'Table'[Year] ) VAR _result = IF ( ISFILTERED ( Slicer[Year] ), IF ( _tableYear >= _startYear && _tableYear <= _slicer, 1 ), 1 ) RETURN _result
No relationship between the two tables.Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi there! I’d be happy to help you with your Power BI requirement. To achieve conditional drillthrough that dynamically includes the selected year and its previous year, you can follow these steps:
Create a Drillthrough Page:
- Add a new page to your report and set it up as a drillthrough page.
- Add the visuals you want to display on this page.
Add a Year Slicer:
- On your drillthrough page, add a slicer for the Year column.
Create a Measure for Previous Year:
- Create a measure to calculate the previous year based on the selected year. You can use DAX to achieve this:
PreviousYear = SELECTEDVALUE('YourTable'[Year]) - 1
- Create a measure to calculate the previous year based on the selected year. You can use DAX to achieve this:
Add a Drillthrough Filter:
- Add the Year column to the Drillthrough filters well on the drillthrough page.
- Add the measure you created for the previous year to the Drillthrough filters well as well.
Set Up Conditional Filtering:
- Use a DAX formula to create a new column that combines the selected year and the previous year. For example:
CombinedYears = VAR SelectedYear = SELECTEDVALUE('YourTable'[Year]) VAR PreviousYear = SelectedYear - 1 RETURN IF('YourTable'[Year] = SelectedYear || 'YourTable'[Year] = PreviousYear, 1, 0) - Use this new column as a filter on your drillthrough page to ensure it shows data for both the selected year and the previous year.
- Use a DAX formula to create a new column that combines the selected year and the previous year. For example:
Enable Drillthrough:
- On your main report page, ensure that the drillthrough functionality is enabled for the Year column. Users can right-click on the Year slicer and select Drillthrough to navigate to the detailed page.
Unfortunately, I can’t provide a sample .pbix file directly, but you can follow these steps to set it up in your own Power BI report. If you need more detailed guidance or run into any issues, feel free to ask!
Is there anything else you need help with?
OR PLEASE FOLLOW BELOW LINK ... I HOPE THIS WILL HELP YOU.
Solved: Is there a way to drill trough based on conditions - Microsoft Fabric Community
Set up drillthrough in Power BI reports - Power BI | Microsoft Learn
Use cross-report drillthrough in Power BI Desktop - Power BI | Microsoft Learn
Set up Drill-through Pages in your Power BI Reports | Zebra BI Knowledge Base
Power BI Desktop May 2020 Feature Summary | Microsoft Power BI Blog | Microsoft Power BI
I hope this helps!
If you found this answer helpful:
Mark it as the solution to help others find it faster.
Give it a kudo to show your appreciation!
Thank you for being an awesome community member!