Forum Discussion
ATYB9
3 years agoNew Member
Data slicing - multiple years
Hello, I am fairly new to Power BI and I am trying to use slicer to apply in a dynamic way so that the visuals on the same page show the relevant data for the particular year. See below my da...
- Anonymous3 years ago
Hi ATYB9 ,
I updated your sample pbix file, please find the detailed steps in the attachment.
1. Unpivot Heading1~Heading5 columns of the query 'Merge1'
2. Create a period dimension table(Don't create any relationship with Merge1 table)
3. Update the formula of measure [SelectedYear] as below
SelectedYear = SELECTEDVALUE('Period Ends'[Period End])4. Create two measures to get the selected year and previous year heading values
CY_Headings = CALCULATE ( SUM ( 'Merge1'[Value] ), FILTER ( 'Merge1', 'Merge1'[Period End] = [SelectedYear] ) )PY_Headings = CALCULATE ( SUM ( 'Merge1'[Value] ), FILTER ( 'Merge1', 'Merge1'[Period End] = [PriorYearToSelectedYear] ) )PS: After you open the attachment, please update the data source file directory with yours for the query "Summary details" and "Draft position"...
Best Regards
ATYB9
3 years agoNew Member
Sorry forgot to thank you for this! It was very much appreciated!