Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
Follow these steps:
Volume traded = SUM(Table[Trade volume])
Volume traded till date = CALCULATE([Volume Traded],DATESBETWEEN(Calendar[Date],MINX(ALL(Calendar]),Calendar[Date]),MAX(Calendar[Date])))
Hope this helps.
If date and trade volume are in the same table, this should work. Why are you using raw_crd_allocations[Trade Date] in your example instead of Table[Trade Date]?
If they're in different tables you may need to change your filter to something like
FILTER(ALL(table), YEAR(table[Trade Date]) <= YEAR(MAX(RELATED(raw_crd_allocations[Trade Date])))
upupup
Hi @Anonymous ,
I am guessing that 2015 is not the start year for sales you need to set a lower boundary in your filter like
Measure = CALCULATE(SUM(table[Trade Volume]), FILTER(ALL(table),
YEAR(table[Trade Date]) >= YEAR(MIN(raw_crd_allocations[Trade Date])) && YEAR(table[Trade Date]) <= YEAR(MAX(raw_crd_allocations[Trade Date]))))
Proud to be a Super User!
Table should be "table" not "raw.crd.allocations". Sorry for mixing them... It is still the original number. Not sure why....
For example for 2015, the cumulated value should be 0.39T not 1.3T... It is confusing
Real quick, could you create a new calculated column with this portion of your code?
COLUMN = VALUES(table[Trade Volume]), FILTER(ALL(table), YEAR(table[Trade Date]) <= YEAR(MAX(table[TradeDate])))
I'm curious to see what values it IS using in the SUM, if it isn't using the right values.
Is this graph being filtered in another way? Say by some category? If so, the ALL(table) might be removing those filters and giving a full total instead of just the subset this graph is for. You can use ALL(table[column]) to just remove those filters:
FILTER(ALL(table[Trade Date]), YEAR(table[Trade Date]) <= YEAR(MAX(table[Trade Date]))
It is much larger than the cumulated value...
Raw data in table in database is something like:
Trade Date Trade Volume
1/6/2015 435222.4512
1/4/2015 232224.2243
3/6/2016 132345.3333
........ ......
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
96 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |