table
79 TopicsCreating a new table with measures in rows
Hi I have a few measures, say M1, M2, M3, which depend on year and month (I already have a date dimension table). Because most of visuals for BSC dashboard and reports, and most of KPI visuals which are suitable for my case, expect measures names to be values in table columns (not single measures), I need to create table like this (from the above measures): Year Month Measure name Measure value 2020 1 Measure 1 12 2020 1 Measure 2 56.6 2020 1 Measure 3 1.3 ... ... ... ... And so on. Now my question is: How can I create a table in the above format from measures which are already mentioned? I know that I MAY be able to do this using Power Query, but there are two problems: First, writing complex calculations for goals, targets and indices in strategy area using Power Query is not as simple as DAX; And second, when I write measures using DAX, I can't use them back in Power Query to create such a table (provided creating such a table in Power Query is possible at all, which I'm not sure about). Thanks in advance.Solved7.7KViews0likes2CommentsHelp needed - How to create a single row table with the value from a selectedvalue.
I need to create a table and then with this table, to create another table. But the first table need to be created from a selection. Tried everything and I just can't go on. The measure getting the selectedvalue: Selected = SELECTEDVALUE(dProducts[ProductCode]) The first table attempt : FilteredBySelectedValue = Var _ProductCode = [Selected] Return ROW( "ProductCode",_ProductCode) The second table attempt : fBasketRelated = FILTER( CROSSJOIN( VALUES(FilteredBySelectedValue[ProductCode]),SELECTCOLUMNS( VALUES( fSalesDetails[ProductCode]),"RProductCode",[ProductCode])),[ProductCode]>[RProductCode]) The result : Nowhere. The model : stevedep The PBI fileSolved7.4KViews0likes6CommentsMeasure not calculating all rows on a table
Hello, I need to make a table that only shows projects that started during or before the selected week, and are due to finish during or after the selected week. I intend to use a binary 1/0 result to filter eligible results and have been testing this measure with a simple dataset in which all entries should return a 1 - but they aren't and I can't work out why. I've added ALL to the filter part of the CALCULATE expression, so it shouldn't be excluding any data. Any suggestions would be appreciated.Solved6.1KViews0likes17CommentsSelect single cell from table to another table
Hi, I have a messy file that i download every quarter. However, that download looks the same every quarter and I would like to upload that file in power bi and create a new table from the current table. In that file, there is a single cell with the name of the period, i want to extract that information into a column in the new table. I.e., the column looks like this: In the new table, I want the period 2018 Q3 to be visible in the column. I tried to following DAX: Period = SELECTCOLUMNS('2020Q1';"Period";CONTAINS(VALUES('2020Q1');'2020Q1'[Column3];"2020 Q1")) and i get the following result: As you can see, I get True instead of 2018 Q3. Does anyone know the correct Dax expresion?Solved5.3KViews0likes9CommentsTable with IF function totals to zero
Hi there, I'm new to DAX and am probably making a mistake because I'm applying Excel logic! I have employee data, which I used to create a table with headcounts and a measure of % Female: The tricky part is when I want a count of how many countries have % Female >= 30%. I added a measure: Meets Criteria = IF ((Female HC]/ [Total HC]) >= 0.3, 1, 0) It works fine in the table, but the total is 0, when it should be 2. Could someone give me a hand here? Thank you!Solved4.7KViews0likes4CommentsFILTER TABLE BASED ON SELECTED VALUE
Dear All, I have this situation. In one table i have costs and revenues for each order/job: OrderN Type Costs Date_operations Values 1 Revenue 1000 1 Cost1 01-05-2020 -300 1 Cost2 -200 1 Cost3 -100 2 Revenue 1000 2 Cost1 03-05-2020 -300 2 Cost2 -200 2 Cost3 -100 3 Revenue 1000 3 Cost1 03-05-2020 -300 3 Cost2 -200 3 Cost3 -100 I gave the opportunity to filter a report based on Date_Operation, so that we can obtain what we have done in one day. I need to show instead in one visual, keeping the selected date filter, to show all the order and all the lines that includes the selected job. For example I have selected the date '03/05/2020' and i wish to see in the a table this result (all the lines orders of the selected date). 2 Revenue 1000 2 Cost1 03/05/2020 -300 2 Cost2 -200 2 Cost3 -100 3 Revenue 1000 3 Cost1 03/05/2020 -300 3 Cost2 -200 3 Cost3 -100 thanks for help.4.4KViews0likes4CommentsSVG Bar Chart within a table
Hi, from searching on the internet i found this brilliant code for adding a barchart into a standard table. However, i can see that ChartScale is hardcoded (at 10,000), however all of my values in the table vastly differ and are independent of each other, therefore a fixed scale doesn't work. How can i adapt the code below so that the Chart Scale is relative to the Maximum value for each row ('Area|Attribute') in the table. Apologies in advance, i'm a complete DAX novice. Dynamic Chart = var BaseURL = "https://chart.googleapis.com/chart?" var ChartType = "cht=bvs" var ChartScale = "&chds=0,10000" var ChartSize = "&chs=150x150" var SeriesColour = "&chco=000000" var ChartData = "&chd=t:" & CONCATENATEX('D - Current Year Data By Week (for Trend)','D - Current Year Data By Week (for Trend)'[zValue (week) as Measure], ",", 'D - Current Year Data By Week (for Trend)'[Reporting Thursday]) return IF(HASONEVALUE('D - Current Year Data By Week (for Trend)'[Key1: Area|Attribute]), BaseURL & ChartType & ChartScale & ChartSize & SeriesColour & ChartData) Thanks StuSolved4.2KViews0likes4CommentsHow to Get Value Percentage based on Criteria in Table?
I have an a Powerbi Table showing a criteria if a phase has been started on time or delayed. This is based on an additional column that shows "Not started" "On time" or "Delayed" based on the planned and actual dates. Help needed: Can someone help guide me on how I can get the percentage of the values in each criteria (depending on whether they not started, on time, or delayed)? For example, the result I want to see is: Out of the 10 projects, 78% of the project phases is not started 22% are on time 0% are delayed Appreciate your inputs 🙂3.7KViews0likes1CommentHow do I validate that an ID exists in another table?
Hello All, I have a table that has multiple ID in one table. For example, one table will have the ID multiple times with different data. ID Data_1 Data_2 1 1 2 2 2 The other table is much smaller and only has the ID once. ID Data_3 Data_4 1 2 3 4 5 I would just like to return "Yes" if it does. "No" if it doesn't. I would like to do this with a calculated column so I have the ability to filter. Thank you in advance!3.4KViews0likes2CommentsCounting months that have a sum greater than zero
I have this table Animal Fed Lion 2/2/2020 Lion 2/5/2020 Bear Dog 2/2/2020 Cat Bird 1/30/2020 Bird 2/2/2020 Deer 1/30/2020 Monkey Monkey Cat Bear Beaver 1/2/2020 Beaver 1/3/2020 Beaver 2/2/2020 Moose and this visual Animal January February Total Bear 0 0 0 Beaver 2 1 3 Bird 1 1 2 Cat 0 0 0 Deer 1 0 1 Dog 0 1 1 Lion 0 2 2 Monkey 0 0 0 Moose 0 0 0 what I need is if an animal was fed at least once that month, signify that with an x and count the x's as shown Animal January February Count Bear 0 0 0 Beaver x x 2 Bird x x 2 Cat 0 0 0 Deer x 0 1 Dog 0 x 1 Lion 0 x 1 Monkey 0 0 0 Moose 0 0 0 How can I do this?Solved3.4KViews0likes7Comments