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.
I want a running total by date for the Amount Column which should be different for each Security ID.
Solved! Go to Solution.
Hi @NI
First add an Index Column from Query Editor or Power Query
Now you can get the expected Cumulative Values using this Calculated Column
Cumulative = CALCULATE ( SUM ( TableName[Amount] ), FILTER ( ALLEXCEPT ( TableName, TableName[Security ID] ), TableName[Index] <= EARLIER ( TableName[Index] ) ) )
Hi @NI
First add an Index Column from Query Editor or Power Query
Now you can get the expected Cumulative Values using this Calculated Column
Cumulative = CALCULATE ( SUM ( TableName[Amount] ), FILTER ( ALLEXCEPT ( TableName, TableName[Security ID] ), TableName[Index] <= EARLIER ( TableName[Index] ) ) )
I have a follow up qustion about your amazing explanation,
let's assume I have another "Country" column at the table, which I want to take as a paramater while calculating the running total, so that the cumulative total column will show not only cumulative total over time by securtiy Id but also by country, like in the example below- how should I revise the calculation in order to do so?
Thanks !
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 |
---|---|
109 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |