Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi, I have the following dataset (image attached). I want to find the Ratio difference as a measure for each year based on the current position effective date column. For e.g. if the year filter is 2023, I want the calculation to be 0.76-0.67, similarly for year 2022 the calculation should be 0.74-0.67. I am facing issues in this logic because the when I filter by year I lose the data from other years. Could you please help me with some pointers on how to solve? I have tried multiple approaches based on my knowledge but can't reach to a solution.
Solved! Go to Solution.
Hi @Ashwini_09 ,
I can confirm that if the field applied on the year slicer originate from the same table as the year field in the table visual, the table visual will indeed display only the corresponding data for the selected year, as you have correctly pointed out.
To accomplish your objective, you may follow the steps outlined below:
1. Create a Year Dimension Table: Initiate by creating a year dimension table. Please ensure that you do not create any relationship with your fact table at this stage.
2. Apply the Year field: Subsequently, apply the year field from the newly created Year dimension table to the year slicer, effectively replacing the original year field .
3. Create Measure: Finally, create the necessary measure to obtain the ratio difference.
Measure =
VAR _selyear =
SELECTEDVALUE ( 'Years'[Year] )
VAR _curratio =
CALCULATE (
SUM ( 'Table'[Ratio] ),
FILTER ( 'Table', 'Table'[Year] = _selyear )
)
VAR _preratio =
CALCULATE (
SUM ( 'Table'[Ratio] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Year] = _selyear - 1 )
)
RETURN
_curratio - _preratio
If the above one can't help you figure out, please provide some raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And it is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @Ashwini_09 ,
I can confirm that if the field applied on the year slicer originate from the same table as the year field in the table visual, the table visual will indeed display only the corresponding data for the selected year, as you have correctly pointed out.
To accomplish your objective, you may follow the steps outlined below:
1. Create a Year Dimension Table: Initiate by creating a year dimension table. Please ensure that you do not create any relationship with your fact table at this stage.
2. Apply the Year field: Subsequently, apply the year field from the newly created Year dimension table to the year slicer, effectively replacing the original year field .
3. Create Measure: Finally, create the necessary measure to obtain the ratio difference.
Measure =
VAR _selyear =
SELECTEDVALUE ( 'Years'[Year] )
VAR _curratio =
CALCULATE (
SUM ( 'Table'[Ratio] ),
FILTER ( 'Table', 'Table'[Year] = _selyear )
)
VAR _preratio =
CALCULATE (
SUM ( 'Table'[Ratio] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Year] = _selyear - 1 )
)
RETURN
_curratio - _preratio
If the above one can't help you figure out, please provide some raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And it is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
6 | |
3 | |
3 | |
3 |
User | Count |
---|---|
13 | |
11 | |
9 | |
8 | |
8 |