powerbi

DAX using SWITCH and SELECTEDVALUE for an output based on a slicer selection

浪子不回头ぞ 提交于 2019-12-11 13:15:22
问题 I have a column that shows number of hours aging ("AgingHours") for "Orders". I want to create another column called "Aged" that will = 1 if the "AgingHours" value is greater than the selected value in the slicer, otherwise 0. The user is able to select either "1 Hr", "2 Hrs", or "3 Hrs" from the slicer. For example: Created slicer called AgingDate[HourDay]. User selects "2 Hrs" from the slicer (which would mean, anything in the "AgingHours" column that is >= 2 would output a 1 in the "Aged"

How to filter rows in a table based on values in another table in power query

爷,独闯天下 提交于 2019-12-11 12:33:29
问题 I have two tables in power query. Price table Date Company Price 01/01/2000 A 10 01/02/2000 A 12 01/03/2000 A 15 01/01/2000 B 15 01/02/2000 B 85 01/03/2000 B 98 Size table Date Company Size 01/06/2000 A 10 01/06/2001 A 12 01/06/2002 A 15 01/06/2000 B 15 01/06/2001 B 85 01/06/2002 B 98 In Price table, I want only to have companies which are in size table. In other words, If company C is not in the size table, I do not need that company data points in the price table. Here no need to consider

Power bi: combine multiple tables into one

本秂侑毒 提交于 2019-12-11 10:48:29
问题 I have three tables whose structure is as follows- Table 1- Table 2- Table 3- I wanted to have a table like this - I tried this particular formula for creating a calculated table- Table = UNION(SELECTCOLUMNS(Table1,"Table1", Tables[Table1]), SELECTCOLUMNS(Table2, "Table2 Totals", Table2[Totals]), SELECTCOLUMNS(Table3, "Table3 Totals", Table3[Totals])) The result I am getting is like this:- I have no idea why this is happening. What to do in this scenario? Do calculated columns not come in

error connecting Power BI enterprise gateway on an azure machine

梦想的初衷 提交于 2019-12-11 10:39:44
问题 I have created a virtual machine on Azure using Image SQL Server Data Center for SQL Server 2014, and created some SSAS cubes on that machine. I am able to access cubes from management studio. I want to access those cubes from Power Bi. I have installed Power Bi gateway on that machine, and connected cubes using live connect method. I further installed Power Bi Enterprise gateway to enable refresh of my cubes to Power BI cloud. Now when I am trying to connect to SSAS on Azure machine using

Power BI - weighted average yield across 2 tables of a given date

隐身守侯 提交于 2019-12-11 09:39:17
问题 I would like to calculate average yield between two relation tables of a given date Table1 Table2 +-------------------------------+ +-------------------------------+ | ID TradeDate Amount | | ID TradeDate Yield | +-------------------------------+ +-------------------------------+ | 1 2018/11/30 100 | | 1 2018/11/8 2.2% | | 1 2018/11/8 101 | | 1 2018/8/8 2.1% | | 1 2018/10/31 102 | | 1 2018/5/8 2.0% | | 1 2018/9/30 103 | | 2 2018/9/8 1.7% | | 2 2018/11/30 200 | | 2 2018/6/8 1.6% | | 2 2018/10

Filter two tables using the same filter in powerbi

穿精又带淫゛_ 提交于 2019-12-11 08:57:18
问题 I have two tables showing country data in PowerBI, one table contains sales data in different countries and another shows stats about each country. I then have a dashboard that has a chart from each table. I want a single filter that filters on the country column in both tables. i.e. If I filter on the US, I will get a chart showing sales data in the US and a chart showing other stats about the US. The country columns have duplicate values in both tables so doing a relationship between them

DAX JOIN if a value is between two dates

℡╲_俬逩灬. 提交于 2019-12-11 08:48:22
问题 In Table A I have a date field called Sales Date. In Table B I have start date, end date, and fiscal quarter. I would like a new Table with the Sales Date from Table A and the fiscal quarter from Table B. How would I do that in DAX? Since most of the UI in PowerBI only allows equality. 回答1: If you want it as a new table you can do something like this: NewTable = SUMMARIZECOLUMNS( TableA[SalesDate], "FiscalQuarter", CALCULATE( MAX(TableB[FiscalQuarter]), TableB[StartDate] <= VALUES(TableA

RLS in Power BI Embedded (App Owns data) with Azure analysis service live connection

戏子无情 提交于 2019-12-11 08:29:43
问题 I am using Power BI Embedded (App owns data) version with Azure analysis service live connection. I want to implement RLS. when userlogged into website then I need to read the data security context(Eg: cutomer_id, service_id, etc.,), For this, I want to pass these values (Eg: cutomer_id, service_id, etc.,) to the azure analysis server instance and then use Role filtering in the anlalysis server instance to restrict the data. Can I read the passed values in the analysis server role filters.

Power BI: Make a Table Visualization display all observations of a dataset

我与影子孤独终老i 提交于 2019-12-11 08:08:32
问题 I've noticed that If you have a table in the Data Viewer in Power BI desktop such as this: Then, if you insert the same table in a Table Visualization, the table will only display distinct values of the categories: How can you set up a Table Visualization so that the data is displayed as it is in the Data Viewer where all observations are displayed? 回答1: Unfortunately, Power Bi Desktop currently does not have an option to display all observations in the Table Visualization(Oct 2018). I am

PowerBI: Slicer to filter a table Only when more than 1 value is selected

折月煮酒 提交于 2019-12-11 08:03:47
问题 I have a table with 5 categories and units displayed into 2 types, Actual and budget. I want to filter this table. Only when 2 or more values are selected in the slicer. Something like this. I though of adding a measure, but dont know how to work the if statement exactly. Measure = IF(COUNTROWS(ALLSELECTED(Report[Shipment Group])) = 1, "Something which would not filter the units", SELECTEDVALUE(Report[Units], SUM(Report[Units]))) Not sure if this is correct approach.Would like to know if any