"totals"
5 TopicsNot show Sum or Average in Total (PIC INCLUDED)
I have a matrix table with two rows. Main one is C1, and the second is C2. I then have C3 for values. I want to display the sum only by C2 as in this situation it doesnt make sense to show C1 totals. Is there a way to omit the numbers in the main category of C1? I have displayed a pic. Any help would be appreciated. So omit the 15 under AAA, BBB, etc. Just clicking row totals doesnt work because I cannot have the end-user click the plus sign and have it roll up to that AAA = 15 ever.1.3KViews0likes7CommentsSUMX is not showing calculating any totals
I have the following measure: 1. Project Load = var result = CALCULATE(SUMX(SUMMARIZE(Project,Project[Project Number]),SUM(Project[Project Value])),ALL('Month Table with weeks')) return result 2. monthly_project_value = CALCULATE( sumx( FILTER('Month Table with weeks', DATE(YEAR(CALCULATE(MIN(Project[Project Start]), ALL('Month Table with weeks'))), MONTH(CALCULATE(MIN(Project[Project Start]), ALL('Month Table with weeks'))), 1) <= MIN('Month Table with weeks'[First day of Month]) && DATE(YEAR(CALCULATE(MIN(Project[Project End]), ALL('Month Table with weeks'))), MONTH(CALCULATE(MIN(Project[Project End]), ALL('Month Table with weeks'))), 1) >= MAX('Month Table with weeks'[First day of Month] ) ), [Project Load] ) ) The filter is used to get the project value for a selected month if the project is live during that month else to not show anything. Although the individual rows are coming correctly but the total is not getting calculated and shows empty.Solved962Views0likes4CommentsRow level Totals - Miscalculation
Hi, I am trying to calculate the total price as shown below. DAX measure i am using is = sum(quantity) * sum(price) Instead of caluclating this way : (10 *4) + (20*5) + (30*6) i am getting total based on this logic: (10+20+30) * (4+5+6) How to create a measure for this logic (10 *4) + (20*5) + (30*6) I only need to show the entire total. Category Name Quantity Price Total Fruits Apple 10 4 40 Fruits orange 20 5 100 Fruits banana 30 6 180 320 Expected Outcome 60 15 900 This is outcome i am getting in Power BISolved724Views0likes3CommentsTotal not visible in Table
Hi everyone, I have a issue, where values are shown on row level but not at the total level. Logic for the calculation has to be as followed: 1. We have to check Billings for the previous month when the Net Billings was not 0, then I have to sum Cost after that period when Net Billings is not 0. 2. If there no record where the Net Billings is not 0 then sum all the Cost. Cost = CALCULATE( SUM('Project Actuals'[Internal_Costs]), USERELATIONSHIP('Project Actuals'[Date],'Rev Rec'[Date]))<p> </p><p> </p><p> </p><p> <li-code lang="markup">Billings = SUM('Rev Rec'[Net Billings]) Below is the DAX which I have tried, but it's not giving me total. Final Cost = VAR _currentmonth = SELECTEDVALUE('Rev Rec'[Date]) VAR _lastNonZeroDate = CALCULATE( LASTDATE('Rev Rec'[Date]), FILTER( ALL('Rev Rec'[Date]), 'Rev Rec'[Date] < _currentmonth && [Net Billings] <> 0 ) ) VAR _earliestDate = CALCULATE( MIN('Rev Rec'[Date]), FILTER( ALL('Rev Rec'[Date]), [Net Billings] = 0 ) ) RETURN IF( ISBLANK(_lastNonZeroDate), CALCULATE( [Internal Cost], 'Rev Rec'[Date] >= _earliestDate && 'Rev Rec'[Date] < _currentmonth), IF( _lastNonZeroDate <> BLANK(), CALCULATE( [Internal Cost], FILTER(ALL('Rev Rec'[Date]), 'Rev Rec'[Date] > _lastNonZeroDate && 'Rev Rec'[Date] < _currentmonth))Below image shows, the first scenario when we have a Value in Net Billings, so in this case I need sum after that period. Second Scenario, when there is no values for previous months in Net Billings, then we have to sum everything in Cost. I would appreciate your help, and if there are any better solution for this. Thanks, Nik828Views0likes2CommentsTOPN + Others not aggregating properly with Legends
Hello dear Fabric Community! After many years of finding solutions here, it is my time to ask for help 🙂 I am working in a TOPN + Others problem, that is making my head spin. I am creating 3 different measures like this: X Measure= SUMX( SUMMARIZE( 'Original Table', 'Attribute 1 Table'[ID], 'Attribute 2 Table'[ID], "@X", [X]), [@X]). I am calculating X as X = CALCULATE( [Qty], NOT ('Original Table'[Category_1] IN { "Value 1", "Value 2" }), 'Original Table'[Category_2] = "ANOTHER_VALUE" ) I had to create them like this as my totals were not aggregating properly due to some overall quantities being positive, but when used with certain attributes for legends, the sum included some negatives. Anyway, that part seems to be working fine! I also created a Total Qty = X + Y + Z. My model is normalized, so I have a central fact table with lots of values, and a lot of additional dimension tables with details for some attributes. However, when aggregating and due to Power BI limitations on the 60 legends limit, when plotting some of this in a column chart it would not display accurate values. I arrived at the conclusion that I needed to use TOPN + Others for this charts, and possibly limit TOPN to have an overall number of legends on screen less than 60. 20 seems to be a sweet spot. Now comes the challenge! I watched some tutorials and arrived to the conclusion that a measure like this would do the trick: TOPN_ = VAR IDTopN = SELECTEDVALUE('TOP N'[TOP N]) VAR IsOtherSelected = SELECTEDVALUE ( 'Attribute 2 Table'[ID] ) = "Other" VAR tab = CALCULATETABLE ( VALUES ( 'Attribute 2 Table'[ID] ), ALLSELECTED ( 'Attribute 2 Table'[ID]) ) VAR _Rank = IF( ISINSCOPE ('Attribute 2 Table'[ID]), RANKX ( tab, [Total Qty] ) ) VAR TopNValues = SUMX ( TOPN ( IDTopN, ADDCOLUMNS ( tab, "@SumValue",[Total Qty] ), [@SumValue] ), [@SumValue] ) VAR OtherValues = SUMX ( ALLSELECTED ( 'Attribute 2 Table'[ID] ), [Total Qty]) - TopNValues RETURN IF ( IsOtherSelected, OtherValues, IF ( _Rank <= IDTopN, [Total Qty] ) ) Now, with the help of another table with TOPN values I can see my chart and it produces almost the same as [Total Qty]. There is a small difference, that sometimes I have been able to identify as this. If I do a table with Attribute 2 and my Total Qty, X, Y and Z values it looks like this (I have around 20k IDs for this attrbute): Total Qty X Y Z ID 1 ID 2 ID 3 ID 4 ID 5 ID 6 ... ... ... ... ... TOTAL 1 000 000 500 000 200 000 300 000 Imagine some values there that end up adding to the respective quantities. However, if I add my TOPN Qty, I get a slightly less qty, maybe something like 998 400. So I've been looking at the data and noticed that some of the "Attribute 2" ID's have negative values. I Filtered my table to display only Total Qty < 0 and see something like this: Total Qty X Y Z ID X - 900 - 500 - 100 - 300 ID Y - 700 - 400 - 200 - 100 Totals -1600 - 900 - 300 -400 And those are exactly my missing QTY from TOPN. So I have the following questions. Am I doing something wrong during the calculations that is somehow excluding the values for these negatives while calculating my measures, X, Y and Z? Am I doing something wrong during the calculations that is removing the conditions on X, Y and Z when doing the Total Qty or the subsequent TOPN + Others? Additional to this, I noticed that if my TOPN value is 5, and if I do some other aggregation on the column chart like, month or year, most values look OK (X, Y, Z are time dependent) and there's always an error with current month/year/Qtr (which is the one above). However, If I change my TOPN to 10, 15, or 20, I will also see some additional months/qtrs/years start to have issues. I was thinking this was due to the additional number of labels and for this I have not been able to identify any data points that might cause it, since even selecting 25 as my value does not increase my total number of legends to above 60. If additional details are needed, let me know. This has been giving me headaches for a bit now. Thank you!Solved1.2KViews0likes4Comments