Forum Discussion
Anonymous
7 years agoNot applicable
Sumx with Dynamic Year
Hello,
I got a question. I want to make the following formula with a new column:
% = Umsatz[Umsatz]/SUMX(FILTER(Umsatz;Umsatz[Bereich]="Ums"&&Umsatz[Jahr]=2017);Umsatz[Wert])
But instead of 2017 I'd like to make a dynamic recognition for that row (I guess I cannot apply to a value on a combobox).
4 Replies
- sokgSolution Supplier
do you have a date in that row???
If yes use YEAR(Table[date]).
Hopefully this is what you are looking for!
- AnonymousNot applicable
you could use a slicer selection output in place of 2017. refer to below link for details
https://www.sqlbi.com/articles/using-the-selectedvalue-function-in-dax/
- AnonymousNot applicable
Ok something is still wrong. In my table the SumMyPeriod, is now the sum of the Row but not the overall of the year. But just in my table. When I put it in a single card, it's the overall sum.
Measure
SumMyPeriod = SUMX(FILTER(Umsatz;Umsatz[Bereich]="Ums"&&Umsatz[Jahr]=[MyPeriod]);Umsatz[Wert])
Measure MyPeriod = SELECTEDVALUE(Umsatz[Jahr])
Measure
Percentage = DIVIDE(Umsatz[Umsatz];Umsatz[SumMyPeriod])- AnonymousNot applicable
please provide sample file