Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Good Afternoon,
I have a matrix table that has survey question from this year and last year and I need to idicate whether the score has gone up or down on the percentage of satisfaction. The overal satisfaction measure is a calculation that counts if respondent Strongly Agrees or Agrees, which works perfectly. When I add the year in it also works perfectly, I am trying to now add a difference column in. So in Rows i have Q's, Columns I have Year, Values I have % Overall (overall measure is (% Overall = [4&5Agree]/Overal Totals 1-5]. I've tried previous date etc... but think I need to make 2 x % Overall one for 2024 and another for 2023 and then cal difference unless anyone has suggestions. Thank you
| 2023 | 2024 | Diff % | |
| Q1 | 75% | 62% | -17.3% |
| Q2 | 85% | 86% | 1.2% |
| Q3 | 50% | 50% | 0.0% |
Solved! Go to Solution.
Thank you, managed to get this to work. Very simple in the end. Created three seperate measure, one to count 2023, and other 2024, and then just a percentage diff for the third
Thank you, managed to get this to work. Very simple in the end. Created three seperate measure, one to count 2023, and other 2024, and then just a percentage diff for the third
@Suzie_Suze_Sue1 , if you are using a date table you can have diff measure and switch in GT, in case you are using year on column from date table
if(isinscope(Date[Year]), [Measure], divide([Measure] - CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-4,QUARTER)) , CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-4,QUARTER)) ) )
else you can create the same last year's measure using a separate qtr year table. Make sure you use year, qtr from date or qtr year table
Last year Qtr = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'), 'Date'[Year]=max('Date'[Year]) && 'Date'[Qtr]=max('Date'[Qtr]) ))
and use in same measure like above
Thank you for the response.
I am finding it hard to create a difference measure. The response table is like this
| Year | ResponseID | Question1 | Rating |
| 2024 | R_8WORaVEsXbxhxy3 | Question 1 | 4 |
| 2024 | R_8XgPAmjgKQ4LY63 | Question 2 | 3 |
| 2024 | R_8ydUBJ9RtRw1JYd | Question 3 | 4 |
| 2024 | R_8YEcQhDWrdf60eZ | Question 4 | 4 |
| 2023 | R_1Ho65FSthee3hNj3 | Question 5 | 5 |
| 2023 | R_1Ho65OKOLP3hPL4 | Question 6 | 4 |
| 2023 | R_1Ho65FSCAZ3hjk9 | Question 7 | 5 |
| 2023 | R_1Ho65FSCAZ3hwE4 | Question 8 | 5 |
I have a measure which is called Overall % which is a percentage of those answer 4 or 5 compared against the totals I have tried what I think you mean above and it just isn;t working or I am doing something wrong.
I can pull throurhg the following table but ideally would like to add a difference column
| 2023 | 2024 | |
| Question 1 | 75% | 62% |
| Question 2 | 85% | 86% |
| Question 3 | 50% | 50% |
Similar to this which is in excel
| 2023 | 2024 | Difference | |
| Question 1 | 75% | 62% | -17.30% |
| Question 2 | 85% | 86% | 1.20% |
| Question 3 | 50% | 50% | 0.00% |
I have a date table, but just doesn't seem to like it when I am using the measure withn the diff measure.
Thanks
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 32 | |
| 27 | |
| 26 |