dax

Power Bi DAX: Show data from 6 months past start date

强颜欢笑 提交于 2020-03-04 19:41:26
问题 i have been having trouble trying to figure out how to show my data past a date that is 6 months past the start date. I need to show the values that are after the 6 months past the start date. Each date is different for each person i have the formula as a calculated column for the 6 months: +6m = DATEADD('Employee List'[Emp. Dates].[Date], +6, MONTH) A measure will not work because i cannot apply it to my table as it comes up with an error. How do i get it to work? Should i scrap the +6m

Power BI change original table name which is displayed in Daxstudio

穿精又带淫゛_ 提交于 2020-03-04 18:15:10
问题 I noticed very odd thing that Daxstudio allows you to view original table name. It is a bit niuanse because when you rename table created in M then Daxstudio still refers to it using original table name, not the new name. Here is how to reproduce the bug. Power BI > Home > Enter Data Name the table RedTable . Run a query in Daxstudio: EVALUATE DISTINCT('RedTable'[Column1]) Now rename the table to BlueTable : And run the query in Daxstudio for a new table name: You can still see the original

Should FILTER be used inside or outside of SUMMARIZE?

微笑、不失礼 提交于 2020-02-27 23:17:07
问题 I have these two queries: EVALUATE FILTER ( SUMMARIZE ( 'Sales', Products[ProductName], 'Calendar'[CalendarYear], "Total Sales Amount", SUM ( Sales[SalesAmount] ), "Total Cost", SUM ( 'Sales'[TotalProductCost] ) ), Products[ProductName] = "AWC Logo Cap" ) ORDER BY Products[ProductName], 'Calendar'[CalendarYear] ASC and this: EVALUATE SUMMARIZE ( FILTER ( 'Sales', RELATED ( Products[ProductName] ) = "AWC Logo Cap" ), Products[ProductName], 'Calendar'[CalendarYear], "Total Sales Amount", SUM (

Counting latest instance of multiple only based on filter context

心已入冬 提交于 2020-02-25 09:49:26
问题 I've got a large table of events that have occurred in an inventory of vehicles, which affect whether they are in service or out of service. I would like to create a measure that would be able to count the number of vehicles in the various inventories at any point in time, based on the events in this table. This table is pulled from a SQL database into an Excel 2016 sheet, and I'm using PowerPivot to try to come up with the DAX measure. Here is some example data event_list : vehicle_id event

AAS tabular model in DirectQuery mode performance benefits

允我心安 提交于 2020-02-25 04:33:18
问题 Suppose you have 10 pretty big fact tables (each 50-100 GBs) that should be queried with Power BI. They doesn't fit into Azure Analysis Services RAM (reasonable price). So in order to use tabular model and AAS you have stay with the following schema: (1) Power BI Desktop -> Azure Analysis Services -> [DirectQuery] -> SQL Database But as far as I know from this article, AAS tabular model doesn't cache any aggregated results (means won't imply any additional performance optimizations). Moreover

DAX SUMMARIZECOLUMNS function - How is this function useful?

冷暖自知 提交于 2020-02-24 16:58:44
问题 According to the DAX Guide (https://dax.guide/summarizecolumns/): SUMMARIZECOLUMNS does not support evaluation within a context transition. This makes it not useful in most of the measures This function is quite powerful and a nice successor to the SUMMARIZE function. But, I'm a bit curious as to why the DAX team would introduce a function like this when it can only be used in very limited scenarios. I guess if you're wanting to build a calculated table it would be useful. Other than that I

Create Measure to Calculate Value Based on Lookup By Date

前提是你 提交于 2020-02-06 07:48:04
问题 I am trying to create a measure that would give me a value based on an expected percentage of of the whole, by date. This will let me create a visual showing expected and actual execution values. I have the actual value calculation down, but I am having issues with the expected calculation. The table with the expected percentage by date is setup with columns Date, Project, Expected Pct Complete 1/1/2019, ProjA, .20 1/2/2019, ProjA, .40 1/3/2019, ProjA, .60 1/4/2019, ProjA, .80 1/5/2019, ProjA

Create Measure to Calculate Value Based on Lookup By Date

流过昼夜 提交于 2020-02-06 07:46:06
问题 I am trying to create a measure that would give me a value based on an expected percentage of of the whole, by date. This will let me create a visual showing expected and actual execution values. I have the actual value calculation down, but I am having issues with the expected calculation. The table with the expected percentage by date is setup with columns Date, Project, Expected Pct Complete 1/1/2019, ProjA, .20 1/2/2019, ProjA, .40 1/3/2019, ProjA, .60 1/4/2019, ProjA, .80 1/5/2019, ProjA

Calculating the standard deviation from columns of values and frequencies in Power BI

喜你入骨 提交于 2020-02-04 03:34:45
问题 I am trying to calculate the standard deviation of a set of values in PowerBI and I am stuck. There are two columns in a table (days and count). This is a frequency distribution of a transportation lane. Days goes from 1 to 100, count is the number of shipments that took those number of days. The formula to calculate the standard deviation of a frequency distribution is pretty straight forward: sqrt(sum(fx * (x - avgx)^2))/sum(fx)) But the Dax is giving me a massive headache. Any help would

Many to Many Relationship BY DATE in PowerBI

一个人想着一个人 提交于 2020-01-26 03:59:25
问题 I need to be able to calculate a measure in a table of many to many relationship. Here are my two tables: Contracts Table Serial# ContractTyp StartDate EndDate A MP 1/1/2017 1/6/2018 B ML 10/24/2017 6/30/2020 A ML 1/6/2018 12/30/2019 C MU 5/15/2018 1/1/2021 Performance Table Serial# Diff Good Bad Date A 15 1 0 1/30/2017 B -24 1 0 12/17/2017 A 57 0 1 4/22/2017 A 18 1 0 2/1/2018 C 123 0 1 9/12/2018 So, my measure is simple. It just calculates the percentage of Good by Serial#. NUM_GOOD =