Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
GuestUser
Helper V
Helper V

Running Total Issue

Hi ,

 

Need help in creating running total column

We are creating report using Connect Live option - SSAS Tabular

 

I have report in below format

 

Category  Name  Sales  RTotal

ABC           XXXX   100   100

XYZ           AAAA  200     300

 

I need to get RTotal Column . i tried using Quick Measure - Running total but it didnt work stating MAx function can work only on numbers and not string (Category)

 

So need help for the same

Pls suggest

 

1 ACCEPTED SOLUTION

Hi, @GuestUser 

Please provide more details .(Where did you write your measure)

Theoretically  no matter in the directquery  or live connect mode, Selectvalue function all can be recognized in  PowerBI Desktop.

 

13.png14.png

 

Best Regards,
Community Support Team _ Eason

View solution in original post

8 REPLIES 8
v-easonf-msft
Community Support
Community Support

Hi , @GuestUser 

Could you please tell me whether your problem has been solved?
If it is,  please mark the helpful replies or add your reply as Answered to close this thread?

 

Best Regards,
Community Support Team _ Eason

v-easonf-msft
Community Support
Community Support

Hi , @GuestUser 

If your want to change the type  of sales from "text"to  "decimal number",you need to do some change in SSAS model.

Please refer to this post to change your type of  sales from "text" to " decimal number" in SSAS. 

https://community.powerbi.com/t5/Desktop/Relative-Date-Filter-Analysis-Services-Live-Connection/td-p...

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

I dont think isssue is with Sales Column.

 

Let me try to explain again :

 

When I select - New Quick Measure - RunningTotal . It assks for following things

 

Base value -  Sales Amount

Field - Category  ( It takes only columns and not measures)

Direction - Descending

 

and it will create measure with below formula

Measure =

CALCULATE(
    [Sales],
    FILTER(
        ALLSELECTED('Table'[Category]),
        ISONORAFTER('Table'[Category], MAX('Table'[Category]), DESC)
    )
)

Which is giving error - like MAX cannot work on String Data Types

 

Hope I am clear.

 

Any suggestions . Basically i need to achieve cumulative Total .

Any other formula /way to achieve the same ?

 

Hi , @GuestUser 

 

Try   measure as  below:

Measure =
CALCULATE (
    [Sales],
    FILTER (
        ALLSELECTED ( 'Table'[Category] ),
        'Table'[Category] <= SELECTEDVALUE ( 'Table'[Category] )
    )
)

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-easonf-msft 

 

Selectvalue function is not recognized in the version of dax which i am using

 

Any other alternative pls?

Hi, @GuestUser 

Please provide more details .(Where did you write your measure)

Theoretically  no matter in the directquery  or live connect mode, Selectvalue function all can be recognized in  PowerBI Desktop.

 

13.png14.png

 

Best Regards,
Community Support Team _ Eason

Greg_Deckler
Community Champion
Community Champion

Sounds like you potentially need to switch Sales from being a Text field to a numeric field in your SSAS model.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Sales is a measure column which is sum of sales_amount which is numeric only

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.