Forum Discussion
Table with year and deltas
- 2 years ago
Hi zervino
You can apply these steps :
1. Create the table for Years :Years = DISTINCT('Table'[Year])2. create a relationship with your table:
3. Create 3 measures :
Max Year = CALCULATE(sum('Table'[Sales]) ,'Years'[Year]=max('Years'[Year]) )Min Year = CALCULATE(sum('Table'[Sales]) ,'Years'[Year]=min('Years'[Year]) )Delta = [Max Year]-[Min Year]4. create a visual:pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
- Anonymous2 years ago
Hi zervino
You can create a measure like below. Use a matrix visual instead of a table visual. Add Team to rows, Add Year to column and add the measure to Values. Rename the column total from the default "Total" to "Delta".
Value = IF(ISINSCOPE(Years[Year]),SUM('Table'[Sales]),[Delta])Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Hi zervino
You can apply these steps :
1. Create the table for Years :
2. create a relationship with your table:
3. Create 3 measures :
pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
The problem with this approach is that the column title is not dynamic, it would be "max year", but depending on which years the user chooses, I would like to see eg. 2022 and 2016
- Ritaf19832 years ago
Super User
For dynamic measure names you can use a workaround with field parameters .
Please refer to the linked video:https://www.youtube.com/watch?v=9_2m5Csr55c
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
- Anonymous2 years agoNot applicable
Hi zervino
You can create a measure like below. Use a matrix visual instead of a table visual. Add Team to rows, Add Year to column and add the measure to Values. Rename the column total from the default "Total" to "Delta".
Value = IF(ISINSCOPE(Years[Year]),SUM('Table'[Sales]),[Delta])Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!