powerbi

How to deal with milliseconds in PowerBI

梦想的初衷 提交于 2019-12-11 15:27:51
问题 I am working with a bot, and I need to sort the event by a datetime column, when I import the column from my database I have this format: 2017-10-19T14:26:57.2349278Z after importing in power BI and changing the data type to date time I get this: 10/19/2017 02:26:57 PM all the trailing milliseconds are truncated, but I need them to sort correctly the events, because some events occurs in the same second. Any body any idea? Thanks! 回答1: Starting with a sample table of dates in your format,

powerbi js export summarized data Error: Cannot read property 'Underlying' of undefined

 ̄綄美尐妖づ 提交于 2019-12-11 15:26:26
问题 i am trying to use exportData(summarized) of powerbi.js and getting the following error. TypeError: Cannot read property 'Underlying' of undefined at r.<anonymous> (reportembed.bundle.min.js:22) at a (reportembed.common.bundle.min.js:16) at Object.next (reportembed.common.bundle.min.js:16) at n (reportembed.common.bundle.min.js:16) at reportembed.externals.bundle.min.js:659 at m.$digest (reportembed.externals.bundle.min.js:670) at reportembed.externals.bundle.min.js:673 at e (reportembed

Compare totals for the same partial date range year-over-year in DAX / Power BI

喜夏-厌秋 提交于 2019-12-11 15:23:40
问题 I'm trying to create a table which shows a sum of monthly values for one year compared to the last year's totals (structured as the screenshot below): Monthly Comparison However, the caveat I'm dealing with is comparing the most current month, which will always contain partial month data (unless it's the last day of the month), to the same date range of the previous year. In the screenshot I attached, our data for January 2018 only goes through January 22nd. However, it's comparing it to the

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

I will like a script in power bi that will calculate percentage increase or decrease from one month to the previous month

拈花ヽ惹草 提交于 2019-12-11 15:13:26
问题 I want to display percentage increase or decrease in total for each month as I select each month i.e when I click on FEB, it should tell me whether there was a percentage increase/decrease in expenses compared to JAN. I have tried different codes but keep getting an error message. Here is a DAX CODE I tried: change perc = VAR ValueLastMONTH = CALCULATE ( SUM ( population[TOTAL] ), FILTER ( population, population[MONTH] = ( EARLIER ( population[MONTH] ) - 1 ) && population[CATEGORY] = EARLIER

Power Query - Add Column CountIF across two tables ie =COUNTIF(People[CityId],[@Id])

烂漫一生 提交于 2019-12-11 14:24:16
问题 I have two tables in PowerQuery City and People . CITY Id, Name 1, Brisbane 2, Sydney 3, Melbourne PEOPLE Id, Name, CityId 1, Jay, 1 2, Sam, 2 3, Paul, 1 4, Sarah, 3 I'd like to add a column to City that shows a count of how many people belong to that city. So far I have: Table.AddColumn(City, "People.Count", each Table.RowCount( Table.SelectRows( People, each [CityId] = [Id] ) ) ) This returns all zeros in the new column. If I replace [Id] with 1 then I get 2 . It appears the [] references

Average gives incorrect number Power BI Desktop

 ̄綄美尐妖づ 提交于 2019-12-11 14:09:54
问题 I have two columns with OpenTasks and ClosedTasks, both have values either 0 or 1. Then I use matrix grouped by date and want to get an average for each column. But number seems incorrect to me. 0.44 and 0.56 I tried to create measure, but gives me the same result. What am I missing? UPDATE: On a picture below I'd expect Sum(TotalTasks)/ (Number of Total Tasks per day) which is: 2,818 / 10 = 281 Is that would be average, am I right? Sorry I'm confused. 回答1: It looks to me like the measure is

Power BI - create link visual

我的未来我决定 提交于 2019-12-11 14:07:42
问题 We’ve developed a custom visual which includes an <a> tag stretched out along the whole visual body (something like imagebutton). By clicking on the <a> container, the user should be navigated to another PowerBI report. Our solution works in the Power BI developer tools, but we’re experiencing some problems when we use the exported visual in Power BI: The Link doesn’t work in browsers, probably because of sandboxing , which is not happening in dev tools. Can we disable the sandboxing?

Calculating average NETWORK days Power BI

吃可爱长大的小学妹 提交于 2019-12-11 13:48:50
问题 I've been reading various threads and guides to performing a 'NETWORKDAYS' style calculation in Power BI but struggling to make it work. I have a table like this: Team | Meeting | Report aaa | 1/1/2018 | 9/1/2018 aaa | 1/1/2018 | 7/1/2018 bbb | 1/1/2018 | 1/2/2018 bbb | 1/1/2018 | ccc | 1/1/2018 | 3/3/2018 aaa | 1/1/2018 | And I want to return the average days without weekends and holidays, something like this: Team | average aaa | 5 (10/2) bbb | 23 (45/1) ccc | 45 (45/1) I have this function

Interactive Dialog Box in PowerBI

痞子三分冷 提交于 2019-12-11 13:23:09
问题 Is there a way to create an interactive Dialog box in PowerBI? I have R script embedded into the query editor, and I would like to have an interactive aspect to where I can use: file<-winDialogString("File input?","") This input would be used as the file location for a read csv and everytime someone opens and executes the Master copy of the PowerBI file, they can input a new file location. I am also open to html, javascript, python... anything that could help. 回答1: The best way to achieve