matrix
110 TopicsTotals by second level of a matrix's column
Hello all, I have a matrix like this: ColField ColValue1 ColValue2 ColValue3 TOTAL RowFiled Open1 Open 2 Open1 Open 2 Open1 Open 2 Open1 Open 2 RowValue1 1 3 6 4 3 7 10 RowValue2 2 4 6 2 1 10 5 RowValue3 5 2 2 2 2 9 13 I'm asked to include in it a Totals column at he end like in the example in red, that is, totals by the second level of columns in the matrix, which are always the same since it's from an aux table: OpenedInterval = DATATABLE( "Interval", STRING, { {"Open1"}, {"Open2"} } ) Thanks a lot in advanceSolved1.1KViews0likes5CommentsSVG icons in matrix not showing up
Hi all, I need some help with my matrix. For the matrix outlined in pink, the SVG icons do not show up 😞 The column [svg_url] has values formatted like this : "data:image/svg+xml;utf8," & "<svg fill='#4E8BA1' width='800px' height='800px' viewBox='0 0 1920 1920' xmlns='http://www.w3.org/2000/svg'><path d='M213.333 960c0-167.36 56-321.707 149.44-446.4L1406.4 1557.227c-124.693 93.44-279.04 149.44-446.4 149.44-411.627 0-746.667-335.04-746.667-746.667m1493.334 0c0 167.36-56 321.707-149.44 446.4L513.6 362.773c124.693-93.44 279.04-149.44 446.4-149.44 411.627 0 746.667 335.04 746.667 746.667M960 0C429.76 0 0 429.76 0 960s429.76 960 960 960 960-429.76 960-960S1490.24 0 960 0' fill-rule='evenodd'/></svg>" The data category is set as Image URL I've had success with the matrix outlined in yellow (using http links), but wanted to use a different method for linking svg icons as I wanted fuller control over the icons' colour. I've also tested out the same values using a DAX measure [svg_url_DAX] and displaying it as a table (outlined in green), it shows up just fine, I wonder what went wrong. 😬 Link to .pbix file + svg icons : https://drive.google.com/drive/folders/1d_6_pT5TJtg5KpRC79plvzXfako83upA?usp=sharing Appreciate any help and pointers! Much thanks!Measure Total, again
Hi, this is my third day struggling with measure total, time to get some help. I have 3 columns in my matrix tabel that should be summarized row by row, and then ofcource sum up everything in the total. Column 1 [PY Actual] is Value from my fact table, column 2 [Inflation_basic] is a value from Inflation table, this tables have dates and Items. Column 3 [Inflation Effect] is Column 1 * Column 2 and gives me correct row value but then sum Total * Total and thats were the problem is. Item and Calendar is the dim tables. I have try summarize, summarize with sumX, hasonevalue, but no luck.Solved1.7KViews0likes9Commentsorder a matrix
Hello, I'm working on Power BI Report Server and I'm experiencing an issue when using a matrix visual. I would like to sort my matrix in ascending or descending order, but it doesn’t seem to work. Here is the structure of my matrix: In the rows, I have clients (from a dimension table), In the columns, I have a field called year_month (ex january 2025) And in the values, I have a measure that calculates the revenue for the last 12 rolling months. The issue is that I want to sort the columns representing the rolling months in ascending or descending order (for example: January, February, March), but it's not working as expected. How can I make this sorting work? Thank you in advance for your help.Solved1.9KViews0likes8CommentsRank/RankX of Measure in a Matrix
I am trying to use a scatter plot to draw a "periodic table" of asset class return by calendar year (similar to the target output picture). In order to do so, I need to first rank the returns in each calendar year. I tried using RANKX but I could not get the expected results (in green letter). Can you shed me some light how can I fix my DAX code please? I have attached my Power BI file in the link below. Thanks in advance. My Pbix file: https://limewire.com/d/BpJDt#VVxFzw3wCRSolved556Views0likes1Commentcombinatorics in dinamic dax
Hello guys, i have posted here so many times about getting a logic right, but i just noticed it was impossible, in the way i was thinking, no one could help me. I have a new aproach of how to get the desired result, its by using combinatorics, of course, i need to know if its even possible in the dax. I have the image bellow that shows how the combinations might work, and ahead i also have the code i'm trying, its not working properly and i would like some help with it. In this code, the objective is have at the end the combinations that attend to the condition that the amount of concatenated orders is the highest and the sum of values are <= 21. Obs. this code might work with many different products, but to this example i just used one. Code: FinalCorrectStatus = VAR CurrentItem = SELECTEDVALUE('DB_ORDERS'[Produto]) VAR OrdersTable = FILTER(ALL('DB_ORDERS'), 'DB_ORDERS'[Produto] = CurrentItem) VAR OrderCombinations = ADDCOLUMNS( GENERATEALL( OrdersTable, SUMMARIZE( OrdersTable, 'DB_ORDERS'[Pedido], "Soma_Quant_Falta", SUM('DB_ORDERS'[QT. falt]) ) ), "PedidosConcatenados", CONCATENATEX(OrdersTable, 'DB_ORDERS'[Pedido], ", "), "Qtd_Pedidos", COUNTROWS(OrdersTable) -- Conta o número de pedidos na combinação ) VAR FilteredCombinations = FILTER(OrderCombinations, [Soma_Quant_Falta] <= 21) VAR MaxPedidos = MAXX(FilteredCombinations, [Qtd_Pedidos]) -- Encontra o maior número de pedidos VAR BestCombination = FILTER(FilteredCombinations, [Qtd_Pedidos] = MaxPedidos) -- Mantém apenas a combinação com mais pedidos RETURN BestCombination Can anyone please help me with it?Solved1.3KViews0likes5CommentsDynamically limit output columns in matrix
I have a matrix which is dependent on date range filter and two parameter field filters (period - day, week, month; metric selection). My goal is to limit the output values to display the last 99 periods of the selected date range where day or week is selected. Saving the 100th column for Totals. Tried below DAX but it is not outputting correctly. Individual charts and bookmarks with reletive date filters dont work either since the date range is dynamic. Is this even possible? VAR _period = SELECTEDVALUE(par_period[par_period Order]) //0=day, 1=week, 2=month VAR _metric = SELECTEDVALUE(par_metric[par_metric Order]) //count=0, percent=1 VAR _minday = CALCULATE( MAX(dimCalendar[Date]), ALLSELECTED(dimCalendar[Date])) -98 VAR _minweekoffset = CALCULATE( MAX(dimCalendar[WeekOffset]), ALLSELECTED(dimCalendar[WeekOffset])) - 98 VAR _minsow = CALCULATE(MIN(dimCalendar[Date]), dimCalendar[WeekOffset] >= _minweekoffset) VAR _filterdate = SWITCH( TRUE(), _period = 0, _minday, _period = 1, _minsow, _period > 1, MIN(dimCalendar[Date]) //will never have more than 100 months in dataset ) VAR _metric1 = CALCULATE([Metric 1], factData[Date] >= _filterdate) VAR _metric2 = CALCULATE([Metric 2], factData[Date] >= _filterdate) VAR _metric3 = CALCULATE([Metric 3], factData[Date] >= _filterdate) VAR _result = SWITCH( TRUE(), _metric = 0 && _period >=0, _metric1, _metric = 1 && _period < 1, FORMAT( _metric2 , "0.0%"), _metric = 1 && _period > 0, FORMAT( _metric3, "0.0%") ) RETURN _resultSolved1.3KViews0likes8CommentsHierarchy in matrix visual: blank rows
Hi everyone! I have a hierarchical tree of departments and i would like the show the processes_id in each unit like that using the matrix visual. The strings in the format xxx-yyyy are the processes id that are in each unit. It's working amost well except the blanks rows 😞 I would like to know if there is way not showing the blank rows. The option 'Show items with no data' is unchecked. In 'rows' i put the four levels and the process_id. The pbix file is here! Thanks for any help!