powerbi

I need to do status counts every day on power bi

谁都会走 提交于 2019-12-11 17:22:43
问题 I have a log table that shows me the order log per day. This table contains one measure and one column which are: Column Date: AllDates = CALENDAR(MIN('LOG'[DTH_INCLUI_LOG]);MAX('LOG'[DTH_INCLUI_LOG])) Measure LogStatus: VAR CurrentDate = SELECTEDVALUE(AllDates[Date]) VAR MaxDate = CALCULATE(MAX('LOG'[DTH_INCLUI_LOG]);'LOG'[DTH_INCLUI_LOG] <= CurrentDate+1) RETURN CALCULATE(MAX('LOG'[VLR_NOVO]); 'LOG'[DTH_INCLUI_LOG] = MaxDate) This column and measure was this table: enter image description

One to Many Table Relationship

谁说我不能喝 提交于 2019-12-11 17:22:22
问题 I am extremely new to Power BI so please bear with me. So assume I have 3 XML sheets (my initial data sources for Power BI) and 2 of them are as simple tables as follows: The tables b and c represents two of my XML files as stated above. File a is as follows: Software + | | Microsoft | + | +--->Windows 10 +-->+ | +--->Windows 7 | | Google | + | +-->Chrome +-->+ +-->Mail Or in XML as follows: <?xml version="1.0"?> <Software Name = "Company Software"> <HeadProduct Name = "Google"> <Product

DAX conditional sum

若如初见. 提交于 2019-12-11 16:54:39
问题 How to construct a DAX measure which returns sum of either A or B. The logic is take B if A is empty. So expected results looks like this: +---+---+----------+ | A | B | Expected | +---+---+----------+ | 1 | | 1 | | 1 | | 1 | | | 2 | 2 | | 1 | 2 | 1 | | | 2 | 2 | +---+---+----------+ | 3 | 6 | 7 | +---+---+----------+ When I use measure: Measure = IF(ISBLANK([SUM(tab[A])]), SUM(tab[B]), SUM(tab[A])) I get 3 for total which is logical but not what I expect. 回答1: I'd recommend using a SUMX

Power Bi - Add thousands separator to cards

老子叫甜甜 提交于 2019-12-11 16:38:32
问题 I have some DAX which adds the thousands separator to my card totals which I use in a measure: Add Separator Measure = VAR right = RIGHT ( [Card Total Measure], 3 ) VAR left = SUBSTITUTE ( [Card Total Measure] , right, "" ) RETURN COMBINEVALUES ( ",", left, right ) Only drawback is that when the total is 0 it keeps the thousands separator before the total e.g. (,£0). How can I add some logic that will remove the separator if the total is 0 to the existing dax? 回答1: This is not a good way to

Power BI why circular dependency is detected

孤街醉人 提交于 2019-12-11 16:20:00
问题 Can you please explain why I run into this alert message of circular dependency when I try to create relationship between dimension #product (or #region) and a #bridge table which is a Cartesian of product x region? I have connected #bridge with Sales and Budget by single column P@G witch is concatenation of product and region. Download file here: PBIX 回答1: A quick and dirty solution is to creat to new versions of #product and #region by using VALUES . This is probably not the best way of

YTD Average in DAX

空扰寡人 提交于 2019-12-11 16:14:42
问题 Need to calculate YTD Average and LYTD Average in DAX , Our Fiscal year starts from Apr. So if my current day is 5th of the June 2017 then lytd_AVG would be from Apr to June would be (MTD Aprn 17) + (MTD May 17) + (MTD June 17)/3 and LYTD_AVG would be (MTD Apr 16) + (MTD May 16) + (MTD June 16)/3 Assuming my current date is 06-03-2017, the YTD avg would be 60 回答1: Assuming your data is given monthly (since you have no sample data), for YTD you should be able to use something that looks like

Updating Power BI data generated by R script

你说的曾经没有我的故事 提交于 2019-12-11 15:57:15
问题 I have some tables, e.g. tbl_A, tbl_B & tbl_C that are created in Power BI using R script. The R script is like this : df2 <- read.csv("data/customer.csv",quote="") df2 <- read.csv("data/order.csv",quote="") #performing various joins / aggregating data tbl_A <- ... tbl_B <- ... tbl_C <- ... And I choose to load tbl_A, tbl_B & tbl_C when the R script finish executing. Then those tables are visualized with PowerBI visualization tools such as stacked bar charts. Everything works fine at this

Power BI Sum cells grouped by same ID

谁说胖子不能爱 提交于 2019-12-11 15:56:09
问题 How can I make a formula which sums all the cells which have the same ID? Edit: Both of these columns are in the same table. I need a new column which calculates the sum of all the hours with the same ID. 回答1: In that case, I would create a new summery table: SummeryTable = SUMMARIZE( 'TableName'; 'TableName'[ID]; "Time_summed"; SUM('TableName'[TimeColumn]) ) Then you will end up with a table with distinct [ID] on each row and the sum of all hours corresponding to this ID from the original

how to use the detailed mode in a power bi graphic

馋奶兔 提交于 2019-12-11 15:39:12
问题 what I'm looking for is that when I click on a bar I can show the sites that belong to that quartile The measure "contar_trabajos" is the following contar_trabajos = CALCULATE ( SUM ( tabla_ranking[nro_trabajos] ); FILTER ( tabla_ranking; [cuartil] IN VALUES ( 'axis'[cuartil] ) ) ) 来源: https://stackoverflow.com/questions/56963624/how-to-use-the-detailed-mode-in-a-power-bi-graphic

Keep historical data in local database to speed up Power BI

僤鯓⒐⒋嵵緔 提交于 2019-12-11 15:38:46
问题 Without a premium licensing, is it possible to simulate an incremental refresh to speed up Power BI Desktop? Say, we keep all the data before a certain date in a local Access database and connect to the "live" database only for data after that date? The question is how to export the historical data from one or several pbix file to Access, how can we do that? 回答1: Try doing it as a composite model. Load your archive data as one query using Import and your recent data as another query using