Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
Hello,
I need to accumulate a value from the beginning of the year until the date filtered by the user. But the beginning of the year is not always January, it may be April. In this case I have a table that shows how effective each year. Ex:
In the case when the user filters a period it should see the value of the beginning of the fiscal year until that filtered date.
This value has to be viewed by company, the measure below works for card objects, but not for charts with dimensions other than date. I believe that 'all' is doubling the values for all companies.
''Accumulate =
var maxfytd = CALCULATE(MAX(F0902[FYTD]))
var maxdate = CALCULATE(MAX(F0902[.Data]))
return
CALCULATE(SUM(F0902[Valor]);
FILTER(ALL(F0902);F0902[FYTD] = maxfytd && F0902[.Data] <= maxdate))'
Can someone help me?
Solved! Go to Solution.
Hi @Jacy,
Based on my test, you can refer to below steps:
1.I have entered some sample data like the picture below:
2.Create a measure.
Measure = CALCULATE(SUM(Sheet5[Value]),FILTER(ALL(Sheet5),'Sheet5'[Date]<=SELECTEDVALUE('Sheet5'[Date]) && YEAR(Sheet5[Date])=YEAR(SELECTEDVALUE(Sheet5[Date]))))
3.Create a Card visual and create a slicer, add the related field. Now you can see the result.
You can also download the PBIX file to have a view.
Regards,
Daniel He
Hi @Jacy,
could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?
Regards,
Daniel He
Hi @Jacy,
Based on my test, you can refer to below steps:
1.I have entered some sample data like the picture below:
2.Create a measure.
Measure = CALCULATE(SUM(Sheet5[Value]),FILTER(ALL(Sheet5),'Sheet5'[Date]<=SELECTEDVALUE('Sheet5'[Date]) && YEAR(Sheet5[Date])=YEAR(SELECTEDVALUE(Sheet5[Date]))))
3.Create a Card visual and create a slicer, add the related field. Now you can see the result.
You can also download the PBIX file to have a view.
Regards,
Daniel He
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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 40 | |
| 38 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 34 | |
| 33 | |
| 30 |