Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi there,
I have a small table like this:
And I want to calculate sum of all previous date. I created a calculated column:
TotalTillThisDate = CALCULATE(SUMX('Table','Table'[Quantity]),FILTER('Table','Table'[Date]<=EARLIER('Table'[Date])))
Then it looks like this:
Everything looks fine. But when I want to add a slicer to show a small period, for example, 1/2-1/4, it looks like as following:
The first number 5 is sum of 1/1 and 1/2. This is NOT wha I want (I don't want 1/1 data calculated in this chart). How to make the data strictly limited to the slicer limits? (In this example, I want to get 3, 8, 11 when I set slicer from 1/2 to 1/4)
Thanks in advance.
Solved! Go to Solution.
https://www.dropbox.com/s/oc067783ze89yrr/kongyuan.pbix?dl=0
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
if you don't have a date table,you can try this
Measure =
VAR _min= CALCULATE(min('Table'[Date]),ALLSELECTED('Table'[Date]))
VAR _max= max('Table'[Date])
return CALCULATE(SUM('Table'[Quantity]),FILTER(ALL('Table'),'Table'[Date]>=_min&&'Table'[Date]<=_max))
Proud to be a Super User!
if you don't have a date table,you can try this
Measure =
VAR _min= CALCULATE(min('Table'[Date]),ALLSELECTED('Table'[Date]))
VAR _max= max('Table'[Date])
return CALCULATE(SUM('Table'[Quantity]),FILTER(ALL('Table'),'Table'[Date]>=_min&&'Table'[Date]<=_max))
Proud to be a Super User!
you are welcome
Proud to be a Super User!
https://www.dropbox.com/s/oc067783ze89yrr/kongyuan.pbix?dl=0
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
User | Count |
---|---|
86 | |
82 | |
68 | |
64 | |
55 |
User | Count |
---|---|
120 | |
99 | |
91 | |
83 | |
65 |