DAX

DAX

1155 bookmarks
Custom sorting
Use value from other row in dataset based on condition
Use value from other row in dataset based on condition
I am trying to do some advanced DAX/PowerQuery equations and I am coming up short and looking for some help. I have a dataset like the below and the use case is to get an average amount of time spent for each 'code'. To come up with that I need to take each true value timestamp and comare it agai...
·community.powerbi.com·
Use value from other row in dataset based on condition
Re: Tricky text search to identify companies with certain charachterisitcs
Re: Tricky text search to identify companies with certain charachterisitcs
If you have a term table like so (let's call it SecTerms): And then another table with a text column (let's call it Companies) like so: Then the following measure will work in a matrix: TermInstance = SUMX(SecTerms, SUMX(Companies, SecTerms[Weight]* (LEN(LOWER(Companies[De...
·community.powerbi.com·
Re: Tricky text search to identify companies with certain charachterisitcs
Re: KeepFilter Help Needed
Re: KeepFilter Help Needed
Hi Do you mean, you want to make sure filters set external to the matrix are applied to the calculation? If so, try this.... ACD Time (min) = VAR TotalSeconds=SUMX(ALLSELECTED('agent_interval') ,HOUR('agent_interval'[acdTime_i_HHMMSS])
·community.powerbi.com·
Re: KeepFilter Help Needed
Re: Runing Balance
Re: Runing Balance
Hi , Based on my test, you should be able to just use the formula below to create a new calculated column in your table to get Running Balance. :smileyhappy: Running Balance = CALCULATE ( SUM ( Table1[Amount] ), FILTER ( ALL ( Table1 ), Table1[SUPLIER] = EARLIER ( Table1[S...
·community.powerbi.com·
Re: Runing Balance
Re: Students variations year over year
Re: Students variations year over year
, Just change it as follows. DIVIDE ( COUNT ( Students[Student ID] ) - prev, prev )
·community.powerbi.com·
Re: Students variations year over year
Re: Previous Date value by country and product and with missing days
Re: Previous Date value by country and product and with missing days
Try this calculated column Column = VAR currentdate = TableName[Date] VAR PreviousDate = CALCULATE ( MAX ( TableName[Date] ), FILTER ( ALLEXCEPT ( TableName, TableName[Country], TableName[Product] ), TableName[Date] < currentdate ) ) RETURN...
·community.powerbi.com·
Re: Previous Date value by country and product and with missing days
Consecutive Days, Back Again…
Consecutive Days, Back Again…
GUESS WHO'S BACK, BACK AGAIN Krissy's back, tell a friend! Guess who's back, Guess who's back, Guess who's back. Guess who's back… Well, as probably most o
·powerpivotpro.com·
Consecutive Days, Back Again…
Forecasting
Forecasting
Hi! I have calculated cumulative forecast and cumulative recorded sales. I need help with a DAX-expression to alter my forecast based on the results of the recorded sales: Example: Original forecast says 10$ per month, cumulative this will give january 10$, february 20$, march 30$ etc... Resulting ...
·community.powerbi.com·
Forecasting
Re: Count duplicates with having constraint
Re: Count duplicates with having constraint
Try This Calculated Column Duplicates = VAR mycount = CALCULATE ( DISTINCTCOUNT ( TableName[surrogate] ), ALLEXCEPT ( TableName, TableName[Parent] ) ) RETURN IF ( TableName[Brand] = "ST", IF ( mycount = 1, "Pass", "Failure" ), "N/A" )
·community.powerbi.com·
Re: Count duplicates with having constraint
Best Approach to Two Dax Challenges?
Best Approach to Two Dax Challenges?
Greetings, I have a table of municipal water consumption records. I'm trying to create a monthly average of gallons used by residents. I need to filter the table by Rate Class = "Residential." Looks easy enough, but my DAX calcs seem wrong. Here's the DAX: Avg Monthly Vol Residential:=CALCULATE(...
·community.powerbi.com·
Best Approach to Two Dax Challenges?
DAX: Rollup value within a group
DAX: Rollup value within a group
Hi Community, I've one question, maybe a silly one, but I already wasted some time trying to solve the following requirement... I've the following very simple star schema model in my PBI file, and what I want to do is to roll up the value measure per Country Name... I'm able to roll up the value...
·community.powerbi.com·
DAX: Rollup value within a group
Re: Time difference between next row
Re: Time difference between next row
May be a MEASURE instead of a column would handle memory better. Try this MEASURE Time Difference Measure = VAR NextRow = CALCULATE ( MIN ( TableName[Date/Time] ), FILTER ( ALL ( TableName ), TableName[Date/Time] > SELECTEDVALUE ( TableName[Date/Time] ...
·community.powerbi.com·
Re: Time difference between next row
De-Seasonalized Correlation Coefficient
De-Seasonalized Correlation Coefficient
This builds off of my original article here: https://community.powerbi.com/t5/Community-Blog/Correlation-Seasonality-and-Forecasting-with-Power-BI/ba-p/14147 and 's take on that approach here: https://community.powerbi.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/196274 To introduce...
·community.powerbi.com·
De-Seasonalized Correlation Coefficient
Detail Rows Documentation
Detail Rows Documentation
Detail Row Expressions Detail row expressions is one of the top new features of Analysis Services 2017 (1400 Compatibility Level) as it provides the equivalent of a drillthrough action for users to…
·insightsquest.com·
Detail Rows Documentation
Re: DAX Comparison Measure
Re: DAX Comparison Measure
Try this: [SubCategory Sales] = VAR CurrentSubCategory = VALUES ( ProductTable[Product Subcategory] ) RETURN CALCULATE ( SUM ( Sales[Sales] ), ALL ( ProductTable[Product Name] ), ProductTable[Product Subcategory] = CurrentSubcategory ) and this: [Category Sales] =...
·community.powerbi.com·
Re: DAX Comparison Measure
The most important DAX concepts
The most important DAX concepts
If you are an advanced Excel user already familiar with PivotTables, eventually you will surpass regular features Excel has to offer, and you will start using PowerPivot. Why? Because in today’s world it is all about Big data. There are so many sources available for analysis,the amount of data is bigger than ever and increasing each day with astonishing speeds....
·exceed.hr·
The most important DAX concepts
Context Transition and Filters in CALCULATE - SQLBI
Context Transition and Filters in CALCULATE - SQLBI
This article explains how the context transition interacts with the filter arguments of a CALCULATE function in DAX. This is important in order to avoid une
·sqlbi.com·
Context Transition and Filters in CALCULATE - SQLBI