dax

DAX Calculated Relationship

十年热恋 提交于 2019-12-12 04:17:52
问题 Month, MyMeasure Nov-15, 150 Dec-15, 150 Jan-16, 200 Feb-16, 200 -- projections into the future not desired Mar-16, 200 -- projections into the future not desired Apr-16, 200 -- projections into the future not desired I have a measure which uses an ALL function to remove the relationship to the date table and calculate a distinctcount in a modified context. Which is great but now the measure extends into the future until the end of the date table. I need to apply another filter after the

Power BI (DAX): Calculating MoM Variance of a Measure Field

回眸只為那壹抹淺笑 提交于 2019-12-12 03:33:11
问题 I have measure formula that takes a table and converts it to monthly count of distinct customers: Active Publishers = CALCULATE( DISTINCTCOUNT( 'Net Revenue Data'[Publisher Name] ), 'Net Revenue Data'[Active Month] = 1) Now, I would like to create a new formula that takes the Month-Over-Month (MoM) variance of this trend, like this: This is the formula I attempted to get the net monthly change: Net Change = 'Net Revenue Data'[Active Publishers] - CALCULATE('Net Revenue Data'[Active Publishers

DAX closest value match with no relationship

旧巷老猫 提交于 2019-12-12 02:47:24
问题 I'm trying to migrate a report from Excel into Power BI and I'm hoping someone can help me as I'm new to DAX. I have two tables and one (let's call it table A) contains a column of planned start Date/Times for events while the other contains the actual start Date/Times of the same events. There is usually only a few minutes difference between the planned and actual start times. I need to match the closest actual start Date/Time from Table B to the planned start Date/Times in table A. There

PowerBI Time Series chart

落爺英雄遲暮 提交于 2019-12-12 02:16:26
问题 So I am trying to plot a value over a time series in powerBI report builder. I am currently getting the data from a relational MSSQL database. Now, this value (UnitCapacity) has a StartDate and an End Date. So what I have done is created a date time dimension inside powerbi using an mquery to replicate the days between a particular year and another. What I am trying to do is to plot the Unit capacities over a time series chart. Then I created filters so that I can choose which Refinery unit

Sumif for PowerPivot

风格不统一 提交于 2019-12-12 01:36:41
问题 I'm fairly new to using PowerPivot and struggling with DAX a little - help! I have two tables: Values and Offices . Values has, among other columns, OFFICE , TARGET and ACTUAL . Offices has OFFICE , REGION , MANAGER and PROVIDER . I want to calculate the actual for REGION , MANAGER and PROVIDER on the Values table so when the user selects an office or a range of offices they see the values for their selection and then against all other offices in the selected regions or for the selected

How to create a DAX measure that extracts Information from the metadata of Tabular model in SSAS or Power BI.?

喜你入骨 提交于 2019-12-12 01:28:40
问题 I have just started learning the SQL Server and Power BI. I'm working on a project and for that i need to create a Measure for the Power BI report that will dynamically extracts the information about all the tables (like Table Name, Last Updated, Dependencies, etc) used in the Tabular solution. I couldn't find any satisfactory answer anywhere. Is there anyone here who could help? 回答1: If you are using an SSAS tabular data model or multi-dimensional cube, you can use DMVs to extract meta data

Power BI Distinct Count Incorrect Total

ⅰ亾dé卋堺 提交于 2019-12-12 01:24:22
问题 I am trying to calculate Distinct Count of 'Cust' in Table A using DAX as CALCULATE(DISTINCTCOUNT('TableA'[Cust])) Where I'm getting the distinct count correctly but the Total is Incorrect. Any suggestions on correcting the formula would be helpful. Thanks!! 回答1: Let's say you have four customers "Alex","John","Mike","Joe" in three BT groups AUT,CT,MT . AUT has "Alex","John","Mike" CT has "John","Joe" MT has "Alex","John","Mike","Joe" Your table would be BT Count ---------- AUT 3 CT 2 MT 4

Power BI - Measure to calculate the distinct count

点点圈 提交于 2019-12-12 01:13:16
问题 I have a requirement where I am calculating the distinct count while leaving a particular value. For example, Consider this - BU Rev RevDes concatenatedcolumnfordistinctcount 1A AppR 1A 1AAppR1A 1A AppR 2A 1AAppR2A 1A FAppR 3A 1AFAppR3A 2A BcR 1A 2ABcR1A 2A BcR 1A 2ABcR1A 2A AcR 1A 2AAcR1A For hierarchy, Imagine something like this - BU - Grand Parent RevDes - Parent Rev - Child First Step – Calculate the distinct count of the concatenated output column For Business Unit, 1A – it will be 3

How can I bring a record from another table with certain conditions from my table in DAX?

和自甴很熟 提交于 2019-12-11 18:39:34
问题 I have two tables. One with dates and customer ID's of tech support given [Table 1], and the other one with surveys sent to the customers [Table 2]). The problem is that the surveys are sent some days after the service is done. So, I need to find the survey ID with the closest date from the survey table and bring it to my tech support table. Here's a sample of my data and the result wanted. Table1: TechSupportDate CustomerID 01/12/2018 1 02/12/2018 2 05/12/2018 1 Table2: SurveyID SurveyDate

DAX TREATAS filtering by another table to get sales of all products on promotion

好久不见. 提交于 2019-12-11 17:39:40
问题 How to filter all products on promotion? Say we have two tables Sales and Budget without physical relationship. Here model is simplified and let's assume that it is the case, we cannot create physical relationship. We have to use virtual relationship. We can see summary: The two first columns are of the Sales table. The third column BudgetTreats is a measure: BudgetTreatas = CALCULATE ( SUM ( Budget[amount] ), TREATAS ( VALUES ( Sales[id] ), Budget[id] ) ) Now I would like to resolve two