metrics
4 TopicsHow the Filter definition of the metric can affect the final result.
Let's assume that I have the Products table in my model defined like this: ProductID UnitPrice UnitsInStock Discontinued 1 10 50 TRUE 2 15 30 FALSE 3 20 20 TRUE 4 25 10 TRUE 5 5 15 FALSE I have created two metrics : Value1 = CALCULATE ( SUMX ( Products, Products[UnitPrice] * Products[UnitsInStock] ), FILTER ( Products, Products[Discontinued] = TRUE ) ) Value2 = CALCULATE ( SUMX ( Products, Products[UnitPrice] * Products[UnitsInStock] ), Products[Discontinued] = TRUE ) The only difference is the definition of the filter. I have evaluated the results in Power Desktop but I do not see any difference. This leads to my question: How could this definition affect the final result of the metric or when might this occur?Solved546Views0likes1CommentNeed Help to apply sorting in dynamic created column and rows header
Hey Expert, Here I'm with a challenging part with Power BI. I'm creating a report similar to the tableau. Analysis-Seasonality: Link I've been created development-related work in power bi similar to this tableau dashboard. but unfortunately, in the end, I'm stuck on the dynamic header sorting. I need help to sort the matrix's dynamic column and rows header. Dynamic means based on the slicer selection, column, and rows header get changed. As in the below image. In the above image, I have a dynamic slicer year * week, year * quarter, etc. based on this slicer selection header gets change. Let's say year * week is selected, then the year will be displayed on row header, and week will be on the column header. so help need in, If I click on Year * Week year row header and column header should be in sorted form ascending or descending whatever. Year (2015, 2016, 2017, etc.) in row header & Weeks (w1, w2, w3, and so on) in columns Similarly when users click on other options like Month * Hour from slicer then both row header and column header should be in sorted form like Month (Jan, Feb, Mar, etc.) & Hour (0, 1, 2, 3, 4, 5, etc.). That's thing is not getting sort out by me. Please help how can I sort this matrix. Here is the link of the .pbix file for reference https://www.dropbox.com/s/cjmt597dba3dsf5/HeathCare%20-%20Seasonality%20Analysis.pbix?dl=0 Last thing I also want to hide empty/zero rows or column values for that I have applied greater than zero checks on visual level filters but it's not working. Please help ThanksSolved5KViews0likes11CommentsCalculate average per month based on status
Hello all. I am struggling with a metric which should be easy, but I do not know why it is not showing the information. I have a table with the connection status of multiple entities. Each row means a connection status per day per entity, as a sample: Entity Code DATE Connection Status 1 11-08-19 A 2 11-08-19 A 3 11-08-19 B 1 11-08-20 A 2 11-08-20 B 1 12-08-20 B 2 12-08-20 C 1 01-09-20 A 2 01-09-20 B 3 01-09-20 C So I have 4 graphs based on the status showing the total amount and compared with other years. As an example, for Status A: Nevertheless now I would like to show it in % of the total that month. So I have created the next metric: Status Average = CALCULATE(COUNTA(ConnectionStatus[EntityCode]),ConnectionStatus[Connection_Status]="STATUS A") / COUNTA(ConnectionStatus[EntityCode]) Nevertheless when applied to the visual is not showing the proper value but this: In top of that, I would love to make one single metric, not one for each Connection_Status, is that possible? I am not being able to use the SELECTEDVALUE function, but I bet because I cannot apply it into the visual itself. I have tried to play with the Average(s) functions but are not working properly for me. Thanks in advanceSolved1.3KViews0likes4CommentsBar chart by quarter including last quarter from previous year
Hi there, I currently have a report that shows me a selected year's metrics by quarter on a bar chart: However, I would like this view to also show me a bar for the last quarter of the previous year for comparison, that would still show up even if I have a page level filter for Year. For example: if I filter my page to the year of 2018, I still want to see the last quarter of 2017 on my bar chart, to the left of the 2018 quarters bars, ideally looking something like this: Is this possible? How can I achieve this or something similar that serves the same purpose? Thanks in advance!Solved7.5KViews0likes5Comments