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

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.

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
Super User
Super User

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


@ 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!:
The Definitive Guide to Power Query (M)

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors