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
Hi,
Please could you remind how best to acheive this...I have table data and would like a new column or measure that shows sum of score for each question based on year, so total for question 1 would be 5, and question 2 would be 6, question 3 would be 8.
Thanks!
A
Question | Year | Score |
| 1 | 2019 | 2 |
| 1 | 2018 | 3 |
| 2 | 2019 | 3 |
| 2 | 2018 | 3 |
| 3 | 2019 | 4 |
| 3 | 2018 | 4 |
Thanks @FrankAT I guess i should have been clearer - i need to be able to use the sum in another calculation.
Cheers,
A
@adavid999 - If you need the sum in a different calculation it would help to know the calculation. But, in general you could do something like:
Measure =
VAR __Table = SUMMARIZE('Table',[Question],"__Score",SUM([Score]))
RETURN
<some calculation across __Table>
thanks @Greg_Deckler I will try this and if I don't get anywhere (likely) I will try and more clearly state what I am trying to acheive...
A
If plot sum(Table[Score]) By question and year it should give you that
Or you want this year vs last year
This Year = calculate(Sum(Table[Score])filter(all(Table),Table[Year] =max(Table[Year])))
last Year = calculate(Sum(Table[Score])filter(all(Table),Table[Year] =max(Table[Year])-1))
Thanks for quick response @amitchandak . I need the result of sum for both years to be used in another calculation. There are many questions, with many different potential filters to view the scores. I'm not sure if plot sum(Table[Score]) will get me there, but will try.
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 |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 68 | |
| 32 | |
| 27 | |
| 25 |