Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I am trying to do running total on non date column. I am trying to show it in a table visual. I have 18k rows.
Following the below dax, its working for me if i limit rows to first 1000 rows. But for entire data, its keeps loading and not coming up.
Can you help me in optimizing the dax measure or is there any other way to achieve this.
My table visual would have the following columns:
CUSTOMER_NO, CUSTOMER_NAME, CODE, COUNTRY, UNIT, Rank, Total receivables, Running total
The following is the measure I have used:
Product Running Total =
var pdtrank = RANKX(ALLSELECTED(table[CUSTOMER_NO], table[CUSTOMER_NAME], table[CODE], table[COUNTRY], table[UNIT]), [totalReceivables], , DESC, Dense)
var runningtotal =
CALCULATE([totalReceivables],
FILTER(ALL(table[CUSTOMER_NO], table[CUSTOMER_NAME], table[CODE], table[COUNTRY], table[UNIT]),
pdtrank >= RANKX(ALLSELECTED(table[CUSTOMER_NO], table[CUSTOMER_NAME], table[CODE], table[COUNTRY], table[UNIT]), [totalReceivables], , DESC, Dense)
) )
return
IF(
[totalReceivables] <> BLANK(),
RunningTotal
)
Below is the error I m getting
If I dont limit the data to first 1000 rows, then its keeps loading and never gives the result
Hi @sharong ,
I think the issue is loading the measure. The measure seems bit complex.
I suggest you to use SUMX and minimize the formula.
Regards,
Nikhil Chenna
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
Hi,
Can you provide me the minimized formula using sumx . will try it out
Hi @sharong ,
Can you only share you sample table as well as a expected output table for it. so that it will be easy for me to test it out too.
Regards,
Nikhil Chenna
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
This is the existing table i have. I want a new column "Running sum" of receivables based on rank st.
Total number of rows in dataset is 18079 rows.
Hi @sharong ,
Create the below measure ,
Running total sales =
VAR IndexRank = [Rank ST]
RETURN
CALCULATE (
SUM ( 'table1'[Receivables]),
FILTER (
ALL ( 'table1'[customer_no] ),
IndexRank
>= RANKX ( ALLSELECTED ( 'table1'[customer_no] ), [sum],, ASC, DENSE )
)
)
Regards,
Nikhil Chenna
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
Hi @NikhilChenna
This too is not working. The table visual keeps loading. Can you please help me out. 18k rows is a small dataset. Dont know why it keeps loading. Please help me out. Struck with this for last 1 week
@amitchandak can you please help me in this. I am not getting a proper reply from anyone
https://drive.google.com/file/d/1IRw6GIiZyFeCXMb3-ARe_WQh86Yva7zf/view?usp=sharing
If I drag the running sum measure into the table visual, it keeps loading and not coming up for 18k rows. But for less rows like first 1000 rows, its working. Can you please provide me with a solution on urgent basis ?
Hi @sharong ,
Is this the output you want ?
Regards,
Nikhil Chenna
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
Hi @NikhilChenna
I tried using the below codes. It takes some 4-5 minutes to load the table. Is there any way of optimizing the below code. Can you help me out.
Yeah but why every value in running sum column is same. I want a cumulative sum
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
21 | |
20 | |
19 | |
13 | |
12 |
User | Count |
---|---|
41 | |
27 | |
23 | |
22 | |
22 |