Forum Discussion
steveborty
Sep 10, 2023Copper Contributor
Running Total for different products and stores
Hi everyone! After a couple of days of trial and error I come to you for some help. I am trying to compute the running total of the sales (SLS) up to a certain week (expressed as year&week numbe...
- Sep 10, 2023
Not sure what is desired output. With
slsRT:=CALCULATE ( SUM ( 'Sales'[SLS] ), FILTER ( ALLEXCEPT ( 'Sales', 'Sales'[Product], Sales[Store] ), 'Sales'[YEARWEEK] <= MAX ( 'Sales'[YEARWEEK] ) ) )it's like
steveborty
Sep 10, 2023Copper Contributor
Thank you for the suggestion!
I think we're getting closer, but I have two questions:
1) Do you know how can I enable the SELECTEDVALUE function? It does not appear as valid when I write it. Is there a way to use IF(HASONEVALUE instead maybe?
2) Is the formula going to work if I have other columns with additional attributes related to the products such as columns indicating the material etc.? Or am I supposed to insert in the formula all the columns for which I will eventually need to filter my Pivot?
I think we're getting closer, but I have two questions:
1) Do you know how can I enable the SELECTEDVALUE function? It does not appear as valid when I write it. Is there a way to use IF(HASONEVALUE instead maybe?
2) Is the formula going to work if I have other columns with additional attributes related to the products such as columns indicating the material etc.? Or am I supposed to insert in the formula all the columns for which I will eventually need to filter my Pivot?
SergeiBaklan
Sep 10, 2023Diamond Contributor
Alternative for SELECTEDVALUE (only on insiders channels so far) is here https://techcommunity.microsoft.com/t5/excel/pivot-dax-formula-and-slicer/m-p/3815349#M190902
Better if you give the sample which illustrates your text.