Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello everyone,
I have a question that I think is simple but I'm not getting it.
I wanted to see values only in the last year, if no filter is selected:
YEAR: (all)
Month | Value | |
Jan 20 | ||
Feb 20 | ||
Mar 20 | ||
(....) | ||
Dec 20 | ||
Jan 21 | 123 | |
Feb 21 | 3232 | |
Mar 21 | 32323 |
Thank you very much in advance for your help,
Simão
Solved! Go to Solution.
@Anonymous , Assume you have a year column too
measure =
var _1 = year(today())-1
return
if(isfiltered(Table[Year]) , calculate(sum(Table[Value])),calculate(sum(Table[Value]), filter(Table, Table[year] =_1)))
or
measure =
var _1 = year(today())-1
return
if(isfiltered(Table[Month]) , calculate(sum(Table[Value])),calculate(sum(Table[Value]), filter(Table, Table[year] =_1)))
@Anonymous , Assume you have a year column too
measure =
var _1 = year(today())-1
return
if(isfiltered(Table[Year]) , calculate(sum(Table[Value])),calculate(sum(Table[Value]), filter(Table, Table[year] =_1)))
or
measure =
var _1 = year(today())-1
return
if(isfiltered(Table[Month]) , calculate(sum(Table[Value])),calculate(sum(Table[Value]), filter(Table, Table[year] =_1)))
Thank you very much!
This is just what I was looking for!
User | Count |
---|---|
103 | |
90 | |
78 | |
72 | |
68 |
User | Count |
---|---|
108 | |
96 | |
95 | |
74 | |
71 |