need info
6 TopicsDYNAMIC FUTURE RUNNING TOTAL
Hi I have really scratiching my head, i have being trying to get a dynamic running total calculation Dax, in which depedning of the week I choose I get a different running total calculation, like the one I depict into the excercise. For example if I chose week feb 20 I need to get the running total calculation into the future depict in column e, First cell is exactly the same for the initial invontiry amount, but for the next week it will be this new value in E4 - Dmd Total for that new week C5, (and so on until you reach 10,221), Also I want to have the flexibility if Change the date from Next week get the result in column G starting on Febreruary 27. Hope someone can help me out Regards767Views0likes2CommentsIF Issue in Measure
Hello Everybody, how are you? ı have question about writing a row context dax in a ıf clause . ı want to wrıte this query(*1) ınsıde of this query(*2). how to do that do u think? *1: IF A[X]="H" THEN A[Y]*A[Z]*(-1) ELSE IF A[X]="S" THEN A[Y]*A[Z] ELSE 0 -- A= TABLE NAME. X,Y,Z COLUMN NAME. NOTE: I TRYED SWITCH FX BUT IT DOESNT WORKED. *2: Values = IF( ISBLANK( [Day] ), BLANK(), ---HERE İS GONNA BE SUM OF FORMULA(*1) ---- )) -- Values is measure. Thanks,1.1KViews0likes2CommentsCALCULATE() or iterator function
There seems to be some personal preference involved with the use of CALCULATE(MAX()) versus MAXX() etc. I am still trying to understand the arguments pro and contra (as well as the context transition differences). I looked at the query plans in DAX Studio for the following versions of the same measure var p=SELECTEDVALUE('Table'[pid]) var c=CALCULATE(max('Table'[date]),all('Table'),'Table'[pid]=p,'Table'[value]="1") var p=SELECTEDVALUE('Table'[pid]) var c1=maxx(filter(all('Table'),'Table'[pid]=p && 'Table'[value]="1"),'Table'[date]) They yield the same result. The query plan for the calculate() version has 21 lines and two scans. The final query is SELECT MAX ( 'Table'[date] ) FROM 'Table' WHERE 'Table'[pid] = 123 VAND 'Table'[value] = '1'; The query plan for the maxx() version has only 12 lines, but the final query is SELECT MAX ( 'Table'[date] ) FROM 'Table' WHERE 'Table'[value] = '1' VAND ( PFCASTCOALESCE ( 'Table'[pid] AS INT ) = COALESCE ( 'CallbackDataID ( p ) ' () ) ) ; And the CallbackDataID is all jumpy and colorful, telling me it rather shouldn't be there. Granted, my test data set is tiny, but isn't that a sign that in this scenario calculate() produces the better query? Edit: Adding TREATAS() to the mix. var p=SELECTEDVALUE('Table'[pid]) var c2=CALCULATE(max('Table'[date]),all('Table'),TREATAS({(p,"1")},'Table'[pid],'Table'[value])) It produces the same final query as the filter enumeration, but but seems to perform a little bit leaner.4.2KViews0likes2CommentsSUMX with two filters
Hi, Im getting the error 'The expression contains multiple columns, but only a single column can be used in a True/False expression that is used as a table filter expression.' for below. Could somebody please help? Count 1 = CALCULATE( SUMX(vw1, [Count]), vw1[checkdate] = 1 && vw1[FinishedDate] = BLANK()) Thanks LiamSolved35KViews0likes2CommentsDAX formula for new columns with groups
Hi, I need help a lot. I have one column in my database, which consist of numbers and text: I want to create new 2 columns which grouped this values by tens and hundreds, e.g. for 122 is in groupe 100 and 120. What I done by now: 1. I divided the column to keep the number without text 2. I try to create calculated column, like that HundredsRange = IF ( [Code — kopia.2] >= 100 && [Code — kopia.2]<=199, "100"; IF ( [Code — kopia.2] >= 200 && [Code — kopia.2] <= 299, "200"; IF ( [Code — kopia.2] >= 300 && [Code — kopia.2] <= 399, "300"; IF ( [Code — kopia.2] >= 400 && [Code — kopia.2] <= 499, "400"; "NotExist" ) ) ) ) BUT IT DOESN't WORK. Can you help me? I need a piece of advice 😞Solved2KViews0likes6Comments