powerbi

Power BI: How to dynamically change currency

試著忘記壹切 提交于 2019-12-12 13:09:36
问题 We have requirement to allow user to choose which currency he wants to see in the dashboard, like below example: By default, it's GBP , if user changes to USD , we need to show the spend by USD. Under the hood we already have table InvoiceDetail which contains columns doing currency conversion beforehand: SpendInGBP SpendInUSD SpendInEUR I am not sure how I can map when user chooses different currency using ChicletSlicer to different Columns. 回答1: If you have a table containing all formats

Turn a JSON array of arrays into <ul> and <li> elements

大憨熊 提交于 2019-12-12 12:27:05
问题 I'm creating a custom visual in Microsoft Power BI. The creation api uses typescript and the d3 library. I'm also using jquery I'm trying to create a hierarchical tree that represents the fields that are dragged into the visual. So the depth of the tree is decided during run-time so It doesn't know how many layers it will have. I've managed to arrange my dummy data into a nested JSON array. This is a screenshot from the console when I do console.log(finalViewModel) [{ "text": "France","id":

DAX Measure: dynamically consider only first for each group and and overall returns their count

…衆ロ難τιáo~ 提交于 2019-12-12 12:00:18
问题 We are struggling in trying to solve a problem that might simpler than I think. I am just stuck. The problem consists of defining a DAX Measure that dynamically counts only first visits in the period for each patient . Visits that are not first in the period must be assigned BLANK() value. Please before discussing the goal let me introduce the scenario. Scenario: We have a model composed of one fact table ( F_Visits ) and two dimensions ( D_Customer ; D_Calendar ). F_Visits has 1M records and

Is it possible to use R Plotly library in R Script Visual of Power BI?

那年仲夏 提交于 2019-12-12 09:45:55
问题 Has anyone tried using Plotly or Highchart in R Script Visual of Power BI, when I try this in R script editor and Run: library(ggplot2) library(plotly) x <- 1:5 y <- c(1, 3, 2, 3, 1) plot_ly(x = dataset$period, y = dataset$mean, name = "spline", line = list(shape = "spline")) Error Message: No image was created. The R code did not result in creation of any visuals. Make sure your R script results in a plot to the R default device. But runs perfectly on my R desktop. Any thought? 回答1: For

Add missing date rows in Power BI/Power Query and take value of row above

坚强是说给别人听的谎言 提交于 2019-12-12 08:16:48
问题 Say I am importing something like the following into PowerBI: Date | Quantity |---------------------|------------------| | 1/1/2018 | 22 | | 1/3/2018 | 30 | | 1/4/2018 | 10 | |---------------------|------------------| Where the external source table is a series of date, value rows with some date values missing. I'd like to execute some DAX/M to add any missing date rows into the data set, where 'Quantity' value is taken from the first date prior. So my resulting dataset would like like this:

Is there documentation/an API for the PBix file format?

孤者浪人 提交于 2019-12-12 07:49:12
问题 We have large csv files in Azure Blobs that we want to report on. It looks like with some M, we can use Power BI desktop to connect to the blobs and start to report on them. We want to automate this process so I guess an option is to create our own pbix files and upload them. Ideally, there would be a better Power BI API where we could configure the data sources server side in the same way as the desktop. I've looked and the pbix files are zips with DataMashup also being a zip (standard openx

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

Creating time factors in PowerBI

為{幸葍}努か 提交于 2019-12-12 03:21:37
问题 I have data on a hourly basis. I would like to format and view the mean of these values across different time factors. Such as daily, weekly, monthly, nightly (9 pm to 6 am) and so on. I've looked at splices and the DAX formatting of new columns and been playing around with that - but so far been unsuccesful. Data example Date Value 28-06-2016 01:00 1 28-06-2016 02:00 1 28-06-2016 03:00 6 28-06-2016 04:00 9 28-06-2016 05:00 15 28-06-2016 06:00 17 28-06-2016 07:00 18 28-06-2016 08:00 21 28-06

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