dax

Power BI Measure to calculate percentage which changes with filters

ぃ、小莉子 提交于 2021-01-29 03:12:44
问题 I want to create a visualisation from a dataset which shows percentages that change accordingly when filters are used. I have a dataset like the below but with over 1 million rows of data covering 18 months. All the fields are text except Month which is a date and SUMofAPPTS which is numerical. SUPP GEOG1 MODE STATUS TYPE TIME Month Day SUMofAPPTS AA 00D Face Att 1 1 Day 2018-06 Sun 12 AA 00D Face Att 1 1 Day 2018-06 Mon 119 AA 00D Face Att 1 4 Unk 2018-06 Tues 98 BB 00D Tel DNA 2 1 Day 2018

Cumulative sum on different columns grouped by date and filtered differently

点点圈 提交于 2021-01-29 02:35:46
问题 I would like to create three cumulative sum columns based on three different column. Each cumulative sum must be calculated as follows: should be grouped by the same date in the dte column column A should be filtered ASC before cumulative sum operation is done column B & C should be filtered DESC before cumulative sum operation. Should I create new tables with columns A, B, C separated from each other? +-----------+----+----------+---+----+-----+----------+----------+----------+ | dte | id |

Subtotal <> sum of the rows

做~自己de王妃 提交于 2021-01-28 11:17:40
问题 I'm a relative neophyte with DAX so bear with me. In the simplest terms, I want to double the measure amount for all regions that are not Europe, then sum the result. Here is some example DAX: DEFINE measure Fact[test] = CALCULATE (IF(SELECTEDVALUE('Dim'[Region]) = "Europe", Fact[Revenue],Fact[Revenue] * 2)) EVALUATE( SUMMARIZECOLUMNS( ROLLUPADDISSUBTOTAL('Dim'[Region], "RegionSubtotal"), "Original Measure", Fact[Revenue], "New Measure", Fact[test] ) ) Region RegionSubtotal Original Measure

Error in creating a calculated column that refers to a linked table in Power Pivot

五迷三道 提交于 2021-01-28 10:36:09
问题 Context: I have a data model in Power Pivot with two tables, tTasks and tCaseworks. They are linked through the common field casework_id (unique to tCaseworks). I am attempting to create a calculated column in tCaseworks that checks whether or not that particular casework has any (i.e. one or more) corresponding tasks. I have attempted the following DAX code: has_task = IF ( CONTAINS ( RELATEDTABLE ( tTasks ); tTasks[casework_id]; tCaseworks[casework_id] ); "Yes"; "No" ) Problem: When I have

In DAX (not powerquery) drop duplicates based on column

对着背影说爱祢 提交于 2021-01-28 07:10:23
问题 In my PowerBI desktop, I have table that is calculated from over other tables with a structure like this: Input table: <table border="1" class="dataframe"> <thead> <tr style="text-align: right;"> <th>Firstname</th> <th>Email</th> </tr> </thead> <tbody> <tr> <td>Scott</td> <td>ABC@XYZ.com</td> </tr> <tr> <td>Bob</td> <td>ABC@XYZ.com</td> </tr> <tr> <td>Ted</td> <td>ABC@XYZ.com</td> </tr> <tr> <td>Scott</td> <td>EDF@XYZ.com</td> </tr> <tr> <td>Scott</td> <td>LMN@QRS.com</td> </tr> <tr> <td>Bill

DAX: distinct count using multiple columns

半腔热情 提交于 2021-01-28 06:12:39
问题 My table includes bunch of duplicated sales information for individual sellers, and I basically created a column and a measure which flags users whether the view they have includes duplicated sales information. here is a very simplified example of what my table looked like SalesManager SalesPersonnel Acccount Product Revenue SalesManager1 SalesPersonnel1 Acccount_A Product_A 100000 SalesManager1 SalesPersonnel1 Acccount_B Product_C 100000 SalesManager1 SalesPersonnel3 Acccount_A Product_A

Calculate Average Number of Days Between Multiple Dates with dax in power bi

佐手、 提交于 2021-01-28 05:10:33
问题 Let's say I have the following data frame. I want to calculate the average number of days between all the activities for a particular account using Dax in power bi Let say I have this: I want a desired result like this How do I achieve this using DAX in power BI 回答1: Assuming you have the data in a table as in your picture, create a calculated column like this: AvgerageDaysInbetween = var thisCustomer = [Customer] var temp = SUMX( FILTER( SUMMARIZE( 'Table'; [Customer]; "avg"; DIVIDE(

PowerBI Dynamic binning (ranges change) based on value of measure

送分小仙女□ 提交于 2021-01-28 02:49:49
问题 I’m trying to represent some continuous data via binning. Continuous weighting data of an area should be binned as: VeryHigh, High, Low, VeryLow. The weighting values are based on an interaction between certain Types of events grouped by an Area and so can change depending on the Type selected by the report user. I have included some sample data below and an outline of what’s been done so far. Start with five sets of area data (A-E). Within each is one or more incident Types. Each incident

Power Bi DAX Decimal Rounding

依然范特西╮ 提交于 2021-01-28 02:26:39
问题 I created a measure using joined tables to show me a rate of something. The problem I'm having is that the rounding of my value is always 2 places. It's a very finite rate that requires at least 3 rounding places. I've tried using ROUND , but that doesn't work. I've included a screen cap of my visual and my measure. 回答1: The ROUND function does round it to 4 decimal places but what you want is to format it to show more decimal places. Select your measure and go to the Modeling table at the

Power BI - Referencing a column for a text search (with wildcards)

一个人想着一个人 提交于 2021-01-28 02:24:06
问题 Let's say I have a large list of names in a single column. I want to see if the names have the letters "y" or "z" in them, with a calculated column that just tags the row as "Y" or "Z". My question is not just about searching with wildcards in DAX. My main question is whether I can create the following table: +-------+-------+ | Y | Z | +-------+-------+ | "*y*" | "*z*" | +-------+-------+ and then use the contents of that table in a DAX search (without creating any relationship). In DAX-ish