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,
I am facing the issues in calculating the running total for the given data. I have tried alot but failed to do that. I want to calculate the running total on the basis of net sales (descending order). I have used the RANKX function to the calculation of rank of for all Stores. Below is the screenshot of data:
Below is the result that I want to calculate:
@tameemyousaf Please add an "Index" column in "Power Query Editor" and then use the below DAX as "New Column"
RunningTotal = CALCULATE(SUM(Test32RunningTotal[NetSales]),FILTER(Test32RunningTotal,Test32RunningTotal[Index]<=EARLIER(Test32RunningTotal[Index])))
Note - Please try to post the sample data in Copiable format.
Proud to be a PBI Community Champion
@PattemManohar Thanks for your response.
Actually the data in the table is not in this format. The data in the table is having date and items also. But I want to show the data in the given format in. I have tried using the index column but the attempt was not successful.
Proud to be a PBI Community Champion
I have data in below given format.
I have a separate Stores table that makes a relationship with this Sales table (Stores.StoreKey = Sales.LocationKey). I am getting Store names from Stores table and sales qty. from Sales table. Below is the screenshot of Stores table:
You may just try the Quick measure Running total.
Thanks for your response. I have also tried quick measure but it was not giving the required result.
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 |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |