powerpivot

DAX Sum of Average to Rank

老子叫甜甜 提交于 2019-12-11 15:48:32
问题 I have a pivot table that pulls a rate by person from powerpivot. The rate is a calculated field, not a column and I need the Grand Total to show as a SUM of the rates, not an average. This is purely for ranking purposes to show who has the highest overall rates to lowest. This is what it looks like with the field I want: Person Jan-2018 Feb-2018 Mar-2018 GrandTotal [DesiredField] A 80% 71% 82% 77.6% 233% B 76% [blank] 85% 80.5% 161% C 82% 85% 79% 82% 246% So person C would be at the top

Searching for DAX formula - equivalent to Excel SUMIF

自古美人都是妖i 提交于 2019-12-11 15:38:49
问题 I am searching for a DAX formula. Specifically: If SOLD (1st column) = count volume (second column), if not SOLD = 0 I need to reflect the volume of SOLD in a new column. UNSOLD Volumes should be 0. I attach the reduced data set. 回答1: If I understand, you want to only perform aggregation when the SOLD_UNSOLD column is equal to "SOLD", otherwise return 0? If so, the following formula will do this, you'll just need to update the column names accordingly. The outer IF prevents problems resulting

How to calculate daily population in DAX

前提是你 提交于 2019-12-11 15:17:48
问题 I'm trying to calculate the daily population of patients at our center for any given date using the patient's booking date (start date) and their release date -- using DAX and Power Pivot. I'm planning on using it in PowerBI eventually. I've tried the formula below. I'm not getting any errors, but when I go to create a pivot table/chart in excel, I'm not getting the correct output. I'm only using two tables: 1) a main table with the patient data and 2) a date table (calendar) and have

PowerPivot Excel - Looping Though Slicer, Extracting PDF - Question about multiple slicers

假如想象 提交于 2019-12-11 15:08:45
问题 On PowerPivot Excel - I managed to loop through slicer and pull PDF following answer on this question: Excel - VBA Looping for slicer selection working on regular pivots, but not working on power pivots Now, question: When I add a secondary slicer to limit primary slicer, the looping goes through the entire selection. Is there a way that VBA just pulls through PDF of items that are selected based on other slicers and not ALL? https://stackoverflow.com/users/11942796/fenixen @fenixen 来源: https

DAX First Occurance in SUMMARIZE, FIRST_VALUE equivalent

混江龙づ霸主 提交于 2019-12-11 14:52:16
问题 I'm trying to create a DAX query to combine several records withing the same table and extract some values from these combined records. The result should display not only the min and the max of start and stop time, but also the corresponding first and last locations. FROM TravelID | TripID | StartTime | StopTime | StartLocation | StopLocation 1001______| 99______| 08:00_______| 08:10_______ | 50AB___________| 99DE___________ 1001______| 100_____| 08:12_______| 08:20________|59DB___________|

Exporting powerpivot data to csv

谁都会走 提交于 2019-12-11 14:29:05
问题 I have an Excel workbook with powerpivot data in Excel data model. I don't have the file used to import the data into powerpivot. My goal is to get the data out of powerpivot to a csv so I can use it in some other software. I can't find any direct export options in powerpivot and since the data is larger than 1.1M rows it can't be pushed into Excel. I found this VBA which appears to work for smaller files but for larger ones I get a timeout error. Option Explicit Public Sub ExportToCsv() Dim

Rank Values of one column by filtering on 2nd column in DAX

a 夏天 提交于 2019-12-11 12:49:32
问题 I'm trying to use the RANKX formula rank the values of one column, but filtered for the value of a second column. In this example, col2 is a simple counter running in ascending value. I'm trying to find item_id's Rank value relative to the col1. col1 col2 1001 8001 1001 8002 1002 8003 1002 8004 1002 8005 I'd like to figure out a col3 that would read: col1 col2 col3 1001 8001 1 1001 8002 2 1002 8003 1 1002 8004 2 1002 8005 3 Because that would be the rank of col2 relative to col1. 回答1: You don

Get Data From Last 48 Hours

被刻印的时光 ゝ 提交于 2019-12-11 12:09:44
问题 I'm using PowerPivot with an SQL Server database and I'm working with a specific table that includes a DateTime column. I'd like to select the data from the table where that DateTime is within the last 48 hours. I'm using a query currently and hoping to achieve something like ... WHERE DT > DATE_SUB(CURRENT_TIMESTAMP, INTERVAL +2 DAY) I'm getting a syntax error at DAY in this particular way. Is this the best way to do it? If so, what's wrong with how I've written it? If not, what's a better

Power query & power pivot - empty table and clearing pivot

核能气质少年 提交于 2019-12-11 10:24:45
问题 Hope you could help. I have the below code in my power query and it is working great with a connected power pivot table. As soon as the Source line is returning "This table is empty" it all goes wrong: Power query return error message that the 2 lines following the source line, are not recognized. The table in the power pivot is showing the last results from the last working query. I need the table to be empty if there are no results. How do i do that? let UrlSource = Excel.CurrentWorkbook(){

DAX/Power Pivot: Calculate 75% Expended Date from Cumulative Total

廉价感情. 提交于 2019-12-11 08:29:28
问题 I have three tables that contain cost: Forecasted Cost, Actual Costs, Invoiced Costs. Each has an "EAC Filter" column for a Y/N of whether to include the cost in an Estimate at Completion, which automatically changes over time and/or as data is added. Here are examples: EAC from the three tables can be calculated as follows: Total Cost = Sum(Forecast[Cost])+Sum(Actual[Cost])+Sum(Invoice[Cost]) EAC = Calculate([Total Cost],EAC_Filter[EAC Filter]="Y") I have a budget at the "Account" level,