The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
19 | |
18 | |
14 |
User | Count |
---|---|
42 | |
35 | |
24 | |
20 | |
20 |