multiple columns
7 TopicsI need help to create a new table from another one
I don't know if this is tricky or is just me, but here goes nothing. I have one table with a group of columns that are months and another group of columns that are also months, each group have a different context in its values; one group is a planified budget, the other group is the real disbursement. Something like this: id title jan_planified_amount feb_planified_amount (…) jan_real_amount feb_real_amount (...) 1 example_1 $500,00 $0,00 (…) $0,00 $500,00 (…) So I tried creating two new tables, one for each group and unpivot the columns, keeping the ids, the months and the amount. Then I create a relation many to many and create a new table with only ids, but when I tried putting the values in a chart it does not work. So I need another way to relate these tables or create only one table with both values like this: id title month planified amount real amount 1 example_1 jan $500,00 $0,00 1 example_1 feb $0,00 $500,00 1 example_1 mar $1.000,00 $1.000,00 1 example_1 apr $0,00 $0,00 1 example_1 may $0,00 $0,00 1 example_1 jun $0,00 $0,00 1 example_1 jul $0,00 $0,00 1 example_1 aug $0,00 $0,00 1 example_1 sep $1.000,00 $0,00 1 example_1 oct $0,00 $0,00 1 example_1 nov $0,00 $0,00 1 example_1 dic $1.000,00 $2.000,00 Because I need a chart like this: Been the bars the planified amount and the line the real amount. I don't know if this is the best way to achieve this but is the only thing I cant think of. I need a little help.Solved775Views0likes2CommentsSumming Multiple IF Statements to get a score
Hi All, I am trying to calculate a score for each row within a table that contain a mark in various columns (example below): Image: Table: Account Red Green Blue Small Medium Large Score [1] [2] [3] [1] [2] [3] 1 X X 2 2 X X 3 3 X X 4 4 X X 4 5 X X 6 So, if a column has an X in it, it needs to add the number underneath the column header for all the columns to give an overall total score. I oringally was do an if statement for each column saying IF column = X THEN column score ELSE 0 and then add them all together, but I couldn't get it to work. Can anyone help? Thanks in advance JonSolved864Views0likes2CommentsCalculating column values based on two columns and problem in fetching last row's calculation
Hello, A newbie to Power BI here. I am facing a calculation problem and not sure where I am going wrong. I am trying to create a new column in a separate table where the idea is to calculate sum (total cost) for a particular 'year' and a particular 'type of cost'. For example, from above table, I want to generate a single value of cost (Approved in Tariff Order) for a single year (2010) and a single type of cost (fixed). Currently I have input the following formula and it gives me the accurate sum but only for (n-1) years. The calculation for last year is somehow not being generated Fixed Costs = CALCULATE( SUM(ARR_Approved[Approved in Tariff Order]), FILTER(ARR_Approved,ARR_Approved[Year]=APPC_Calculated[Year]), FILTER(ARR_Approved,ARR_Approved[Type of Cost]="Fixed") ) See the output column generated in Power BI as below: Appreciate all the help I can get here. Thank you 🙂Solved2.1KViews0likes1CommentGet multiple columns in one columns
Hi All, I have calculated Maximum and Average measure. Please find the below screenshot: For get this metrics, I have used formula 1. Max = MAXX(ALL('Table'[Brand]),[Sum_Traffic]) 2. Average = Averagex(ALL('Table'[Brand]),[Sum_Traffic]) My query is : Can we convert this table as Thanks ShipraSolved1.1KViews0likes5CommentsHow can I Create multiple columns selection in Power BI
Hi Everyone, I want to provide end user the option to select any column, for example we've sales and want to see sales by Country, State or Customer so that user can select any column that we've added from a single selection. Thanks,3.2KViews0likes15CommentsIm having troubles with my switch in DAX
Hi Guys, Im a beginner with DAX and what I dit wrong. This is my error message: The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value. And this is my code: CountFalse = SWITCH( IF( FILTER(Table1,[CheckColumn2] = "NO"), COUNT(Table1[Column2]), BLANK() ), IF( FILTER(Table1,[CheckColumn9] = "NO"), COUNT(Table1[Column9]), BLANK() ), IF( FILTER(Table1,[CheckColumn15] = "NO"), COUNT(Table1[Column15]), BLANK() ), IF( FILTER(Table1,[CheckColumn18] = "NO"), COUNT(Table1[Column18]), BLANK() ) ) I want this code to count all the NO's in Table1. Multiple Columns have a NO so Im using a switch to count them all. Does someone know how I can make this work or do this in a easier way? Thanks!Solved1.1KViews0likes4CommentsFiltering one table with 3 different columns from other
Hello, I'm a beginner in Power BI (low knowledge in DAX functions yet), and I would like to ask for some help in the challenge I'm facing: I have two different tables: "Recommendations" and "Knowledge Database". In the table "Recommendations", I have the 4 columns that I'm using as the slicers to filter my report accordingly to the image below (columns System, Size, Format, Opening). The first matrix visual (in red) belongs to the same table than the slicers, so until here I haven't had any problem. In the second table (Knowledge Database), I have the same 4 columns with one additional column called "Information". My challenge here is that I want to show in the table in green the results of this "Information" column filtered by the slicers which belong to the "Recommendations" table. The problem is that the Power BI allows me only to create a relationship between one column of each table, so I have to choose only one slicer to use as filter, but I need to be able to filter the results using a mix of all the 4 slicers. (E.g. Filtering the System "TBA", Size "200", Format "All", Opening "All"; or filtering System "All", Size "400", Format "Base", Opening "All") Below you can see the images of both tables (First Image: Recommendations, Second Image: Knowledge Database) Is there any way to perform such filter? Thanks in advance!!996Views0likes4Comments