dax

  1. D

    DAX running total column using ALLEXCEP and ALL and VALUES

    Hi My question relates to the use of multiple CALCUALTE / CALCULATETBALE. I've been using ALLEXCEPT to create a running total column by a certain criteria , customer or whatever, so EXCEPT that criteiria, but wanted to use ALL and VALUES, to see how it worked, The formula I used was VAR...
  2. D

    DAX studio and running total

    Hi, I have a calculated column , power pivot , returning a running total , (dex = index) EVALUATE VAR CurrentRow = SaleT[dex] VAR CurrentItem = SaleT[item] VAR filteredtable = FILTER ( ALL ( SaleT ), SaleT[dex] <= CurrentRow && SaleT[item] = CurrentItem ) RETURN CALCULATE ( SUM (...
  3. D

    DAX running total using 'Calendar' table that respects filter context,

    I hope I've got my row / filer the the right way round, I created two measures one using the dates from the fact table the other from the calendar table RTM using C = VAR mcdate = MAX('Calendar'[Date]) VAR anser = CALCULATE([Tsales],FILTER(ALL('Calendar'[Date]),'Calendar'[Date]<= mcdate))...
  4. D

    ALLEXCEPT versus ALL and VALUES

    Hello, I've been experimenting with ALLEXCEPT and ALL and VALUES, and aren't quite sure what's happening, with 'excpept' it seems to see the entire data model and return the overall total regardless of the current filter context but with VALUES, the total is in the current filter context and...
  5. D

    DAX running total that does not recalculate at the end of a period or group.

    HI, I have a simple running total measure ; RTM:=VAR mdate = MAX(Table2[Date]) VAR anser = CALCULATE([tSales],FILTER(ALL(Table2[Date]),Table2[Date]<= mdate ) ) RETURN anser but when I put this into a pivot table where the dates are groped by Month the accumulative pricess restarts at the...
  6. D

    Total iterating over dimension table

    Hi, I have set up two simple tables, "tsales" ; Product , Sales , Discount applied, and 'Product' consisting of Product , Price, so revenue would be tsalesA:=SUMX(Tsales,Tsales[Sales]*(1-Tsales[Sales Discount])*RELATED('Product'[Price])) ignoring the discount and iterating over the...
  7. J

    DateDiff not working the same in excel as it is Powerbi

    Hi, In PowerBI I have a measure with DaysPastDueDate = DATEDIFF (AUDIT_HEADER[DUE_DATE], TODAY (),DAY) That doesnt seem to work in Excel PowerPivot and it requires it to be a calculated column. If I make the column witrh that calculation it doesnt seem to like it when the start date is...
  8. D

    AVERAGEX iterating over one table with calculation on another

    Sorry for a poor description, essentially in the scenario the granularity of an average was changed by iterating over the linked date table; So to start you have ; Average M:=AVERAGEX(fTransactions,[Total Revenue Iterate Over Fact]) Fine, but do change the granularity this then becomes...
  9. D

    DAX studio

    Hi, Is it possible to use DAX studio without a connected data source, I ask this because I was using it to build a date table from scratch which I then put into excel using a 'existing connections' and pasting the code in., so the fact that a data source was connected it wasn't needed. Richard.
  10. D

    DAX nth largest value

    Hi, Is there a way of getting the nth largest value using DAX, something like LARGE in excel or list.firstN ( list, count ) {x} ? Richard
  11. arnabmit

    Sum of bottom 20% values

    I was trying to get the sum of the bottom 20% values, then show it by year. However, the DAX returned the total value. Bottom 20% Values = VAR BV = ROUND(COUNTROWS(Sheet1) * 0.2,0) VAR DR = RANKX(ALL(Sheet1),CALCULATE(SUM(Sheet1[Value])),,DESC,Skip) RETURN IF(DR <= BV...
  12. D

    DAX Keepfilters on two tables,

    Hello, I'd like to run to filter my result by two tables but using keepfilter so the external filter context is kept, < EVALUATE...
  13. P

    Generate only a needed number of rows in DAX

    Hi guys! We are woking with big documents ( ~ 20 pages), however for a visualization we need to analyze them by sentences. We have a code for break-down, however the first step for that is that we need a calculated table which generates X number of rows. We have performance issues with this...
  14. D

    SUMX iterate over smaller table using VALUES

    Hello, just to note I meant to put VALUES not RELATED in the title, but posted and edit won't let me change it. (edit: changed for you :)) Just a question regarding what's actually happening,; I have a formula ; Over...
  15. D

    DAX filter on two tables

    Hi, I'd like t filter by two tables, very simply I have : Green and 10+ :=CALCULATE([Total Units]...
  16. D

    DAX Direct Query

    Hello, I have a question regarding some DAX functions, What exactly does This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules. mean? I presume the function has to be nested...
  17. D

    DAX Rolling 7 day total

    Hi, I'm trying to do a 7 day rolling total in DAX, I've followed a similar structure to what I'd do in excel, in excel I wouldn't have the first condition, just greater than; < moving := VAR abc = MAX(Table1[Date])...
  18. S

    DAX query - Looking up (v-lookup) in the same table

    Hi All, Hoping can get some input from the DAX experts here. I have a table imported via power query. It has 2 columns Employee ID - this contains a list of employee IDs Month - this contains 'current month' and 'last month' value Note - The same employee ID can appear twice in the table...
  19. D

    Declare a variable containing a variable

    Hello all, I have a very simple table date, product code, units and have created a running total measure that allows me , when dropped into a pivot table to retain all of the product I'd 's while only returning a running total for one, in this case 'a' . < abc := VAR mdate = MAX (...
  20. D

    DAX AverageX

    Hi, I'm having a problem understanding what I'm doing wrong; I have a measure for Revenue; < SUMX(fTransactions, fTransactions[UnitsSold]*(1- fTransactions[Discount])*RELATED(dProduct[RetailPrice]) )...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top