dax sum
10 TopicsSum assigned hours between 2 dates and also display grand total against each row
Hi all, I have an existing measure which calculates Assigned hours between a start and end date. This works for each single row. Assignment Hours between start and end dates = CALCULATE ( SUM ( 'Assignments'[HoursEffort] ), FILTER ( 'Dim_Date', 'Dim_Date'[Date] >= MIN('Assignments'[StartDate] ) && 'Dim_Date'[Date] <= MAX ('Assignments'[EndDate] ) ) ) What i need help with: I need to modify the measure to give me a "Grand Total Assigned hours" for the same task if it is entered multiple times with a different start and end date. In the below table I expect a "Grand Total Assigned hrs" of 20 against each row. Project Task Assigned Staff StartDate EndDate HoursEffort Grand Total Assigned hrs Project 1 Task 1 John 01/01/2025 31/01/2025 10 20 Project 1 Task 1 John 01/02/2025 28/02/2025 10 20 How can I modify the measure to give me the expected results? Or do i need to do some sort of grouping to combine the 2 rows? Many thanks in advanceSolved981Views0likes3CommentsDAX Sum Values based on 3 different tables criteria
Hello Dears, I've the below data set and I want to create a measure that calculate total number of trips with the below critera: - Sum 'DR_DUTIES'[# Of Trips] If 'ROSTER DATABASE'[DATE] = 'APP_TT'[Date] & 'APP_TT'[Applied TT] = 'DR_DUTIES'[TimeTable] & 'DR_DUTIES'[Driving Duty] = 'ROSTER DATABASE'[Activity] I need to SUM the # Of Trips and total Driving Hours per Employee based on Date, Activity, and Applied Timetable 1- DR_DUTIES Table: Driving Duty TimeTable # Of Trips Driving Hours M-01 Ph3BTTR_TH_GIZA 6 6:52:57 AM M-02 Ph3BTTR_TH_GIZA 5 5:47:14 AM E-01 Ph3BTTR_TH_GIZA 5 5:30:41 AM E-02 Ph3BTTR_TH_GIZA 6 6:47:20 AM M-01 Ph3A_WE_LUXOR 5 4:18:32 AM M-02 Ph3A_WE_LUXOR 6 5:13:27 AM E-01 Ph3A_WE_LUXOR 6 5:13:27 AM E-02 Ph3A_WE_LUXOR 6 5:13:27 AM M-01 Ph3BTTR_WD_ASWAN 5 5:29:32 AM M-02 Ph3BTTR_WD_ASWAN 6 5:04:59 AM E-01 Ph3BTTR_WD_ASWAN 6 6:34:00 AM E-02 Ph3BTTR_WD_ASWAN 6 5:05:30 AM 2- Applied TT Table: Date Applied TT 01-Jun-23 Ph3BTTR_TH_GIZA 02-Jun-23 Ph3BTTR_TH_GIZA 03-Jun-23 Ph3BTTR_WD_ASWAN 04-Jun-23 Ph3A_WE_LUXOR 05-Jun-23 Ph3BTTR_TH_GIZA 06-Jun-23 Ph3A_WE_LUXOR 07-Jun-23 Ph3BTTR_WD_ASWAN 08-Jun-23 Ph3BTTR_WD_ASWAN 3- ROSTER DATABASE Table: CODE Date Activity Emp01 01-Jun-23 E-02 Emp01 02-Jun-23 E-01 Emp01 03-Jun-23 M-02 Emp01 04-Jun-23 M-01 Emp01 05-Jun-23 E-02 Emp01 06-Jun-23 E-01 Emp01 07-Jun-23 M-02 Emp01 08-Jun-23 M-01 Expected Results should be 45 Trips and 43:32 Driving hours during the period 1-Jun-23 to 8-Jun-23 for the Emp01Solved641Views0likes3CommentsDAX Sum if Date, Time table, and Activity between 3 different tables
Hello Dears, I've the below data set and I want to create a measure that calculate total number of trips with the below critera: - Sum 'DR_DUTIES'[# Of Trips] If 'ROSTER DATABASE'[DATE] = 'APP_TT'[Date] & 'APP_TT'[Applied TT] = 'DR_DUTIES'[TimeTable] & 'DR_DUTIES'[Driving Duty] = 'ROSTER DATABASE'[Activity] Also, I need to create another measure with the same critera but to Sum 'DR_DUTIES'[Driving Hours] noting that this column is Time formatted [hh:mm:ss AM/PM]. Thanks in advance!367Views0likes1CommentColumn is showing correct total but row level sum is blank
I have a column which is budget amount coming from budget table. There is a relationship exists between budget and orders via product and when I use that column inside fact orders, I am not getting row level data (I am expecting atleast same values if relationship issue ) but total is showing correct valueSolved1.9KViews1like1CommentDAX Sum or Max value greater than input value(slicer)
Hi, I have table columns sublock,elementpath, value(integer). sublock and elementpath forms unique key. i have input slicer to enter scalar value integer value like 10, 44.input slicer sublock has values 1a,1b,1c to 1s, 2a,2b,2c to 2s, 4a,4b,4c to 4s i created running total measure (RT_M)for input column value. if user selects sublock slicer 4F. then report visual starts from 4F.i created distance measure from input slicer it will generate distance values(ex: 4f 0, 4g 1,4h 2) so i can sort visual by distance.If user enters 50 as input,i need to get max running total or sum up to the block. example in below screen shot for input 50 , running total greater than or equal to input value(50) reaches at block 4H. I need to get sum value up to block 4H(from 4F to 4H) that is 54.47. I created measure that is working correct 80 percent of time , somet times its giving incorrect value. please help. thanks for ur time. Below is the measure. EndingMW_M = var CurrDistance = [TargetMW_Dis] var result = Calculate(SUM('EEP vwMWValue'[Value]),Filter(ALL('EEP vwMWValue'),'EEP vwMWValue'[D_I_M] >=0 &&'EEP vwMWValue'[D_I_M]<= CurrDistance)) RETURN result in above [TargetMW_Dis] is measure max distance from block 4F to 4 H that is 2. D_I_M is measure to calculate distance from slicer selection block(4F)1.2KViews0likes4CommentsSUM measure from different period
Hello, For the below data I am trying to calculate the sum of the sale amount where the sale is not in the reporting period but the service start date is. I keep trying to play around with the SUM formula but I cannot get it to work! Can somebody please help? TIA1.6KViews0likes7CommentsTricky Situation with SUM
Here is the Data I am using: Type Spent Returns Apple 100 Orange 50 200 Banana 25 150 Pear 500 Kiwi If I use ROI = sum(Data[Returns]) / sum(Data[Spent]) I get the following Information on Data: the spent and returned data is filled in by the user and will remain blank until then. So will have to create DAX measures that will assign 0 where there is a blank. However, if we do that, we get Infinity and NaN for Pear or Apple. So we have to HardCode such incidents to 0. Questions 1) I also want to show the Kiwi line item as well and assign 0 to the ROI column for Kiwi. 2) How to deal with Infinity, show 0 instead of Infinity. 3) Result in either 1 of the shown expected output will work Any suggestions, tips, and tricks are welcome. I want to get the following output along with totals at the end for the first two columns and the average for the third column, shown below: Expected Output Type Spent Returns ROI Apple 100 Orange 50 200 4 Banana 25 150 6 Pear 500 Kiwi Total 175 850 5 OR Type Spent Returns ROI Apple 100 0 Orange 50 200 4 Banana 25 150 6 Pear 500 0 Kiwi 0 Total 175 850 5Solved1.3KViews0likes4Commentstable visual summing total wrong
im trying to calculate commission by each agent according to pack he sold and number of transations by pack, the problem is im when im multiplying the pack commission by number of transactions it's doing the same multiplication forthe overall total transactions and the overall commssion tota which which is resulting in wrong total commission for the agent. in the screenshot the total commission should be 124.305 instead of 3908.21 the measure im using: CALCULATE(COUNT('categories trans'[revenue]) * SUM('categories commision'[Commission]), GROUPBY ( 'categories trans', 'categories trans'[AGENT_NAME], 'categories trans'[Categoty], 'categories trans'[Commitment], 'categories trans'[BASE_TYPE], 'categories trans'[revenue] )) note: the data model consists of two table : trancations table by agents and commission pack by categorySolved806Views0likes2CommentsAverage Consum(kWh) per day
Hi, Can someone help me with this please. I must create a line visualisation showing the sum of Consum(kWh) per Day. But when looking at that for a month, it needs to be the average of the values for each day of that month. I have my Calendar Table: 'Calendar'[Year], 'Calendar'[Quarter] 'Calendar'[Month] 'Calendar'[Date] My FACT TABLE has columns: 'FACT TABLE'[Consum(kWh)] 'FACT TABLE'[Start Date] 'FACT TABLE'[SDR ID] - this is my Unique ID column 'FACT TABLE'[CP ID] - this is my Charger Sessions column Thank you greatly if you can work this out. Best, JSolved702Views0likes2Commentshow tu sum more filtered fields in one column
Hello guys, is there a better way how to make a simple sum for specific fields in one Column than this below ? SR1100 positive 3 = CALCULATE ( [Total Value], FILTER ( Total_2021, Total_2021[Consolidation account] IN { "V10000", "V20000", "V30000" } ) )Solved1.1KViews0likes6Comments