hlp dax formula
3 TopicsDax Calculation on power bi
file excel and pbix hai i wanna calculate total vehicle and total average base on dept like this on facility management (FM) i got total average = 59,11932 and total vehicle = 50 on finish good (FG) i got total average = 76,45089 and total vehicle = 28 but on my power bi, i canot make data like this this is my total vehicle divide by dept SumDistinctIfDifferent = VAR DistinctInternalIDs = VALUES( 'Table 2024-08-06 until 2024-08-27 (2)'[Total Vehicle 2] ) RETURN SUMX( DistinctInternalIDs, CALCULATE( DISTINCTCOUNT( 'Table 2024-08-06 until 2024-08-27 (2)'[internal_id]), ALLEXCEPT( 'Table 2024-08-06 until 2024-08-27 (2)', 'Table 2024-08-06 until 2024-08-27 (2)'[dept_id] ) ) ) how to calculate total vehicle and total average like my excel ?? total vehicle what i made Total Vehicle = DISTINCTCOUNT('Table 2024-08-06 until 2024-08-27 (2)'[internal_id]) DB sql source code : select distinct internal_id, type, status, unit, operational_date, time_start, time_finish, dept_id from vms_vhl_operational where operational_date between '2024-08-06' and '2024-08-27' and unit = 'MAIN'Solved914Views0likes3CommentsDAX finding dates
Hello, I need to calculate 2 values using DAX function. 1. Calculate the penultimate date for product id 2. Calculate the quantity for a given date and product id. an example table with data is attached. I will be grateful for your help. id prod date qty 82 17.04.2023 4 801 17.04.2023 5 632 17.04.2023 11 632 17.04.2023 11 5583-2 17.04.2023 3 5583-1 17.04.2023 3 5536 17.04.2023 30 5535 17.04.2023 9 5533 17.04.2023 9 5531 17.04.2023 9 5528-1 17.04.2023 20 5527-4 17.04.2023 1 5526-4 16.04.2023 6 5526-3 16.04.2023 6 5526-1 16.04.2023 6 5525-3 16.04.2023 20 5525-1 16.04.2023 20 5523-2 16.04.2023 26 5522 16.04.2023 4 5521 16.04.2023 4 5517 16.04.2023 4 5516 16.04.2023 8 5515 16.04.2023 5 5510-5 16.04.2023 4 5486 16.04.2023 12 5485 16.04.2023 12 5481 15.04.2023 12 5423 15.04.2023 2 5421 15.04.2023 1 5415 15.04.2023 10 5309-1 15.04.2023 1 5280 15.04.2023 10 5261 15.04.2023 2 525-2 15.04.2023 3 525-1 15.04.2023 5 524 15.04.2023 96 5226-1 15.04.2023 3 5220-2 15.04.2023 6 522 15.04.2023 96 5219-1 15.04.2023 10 5217-1 15.04.2023 5 5215-2 14.04.2023 1 518-2 14.04.2023 30 518-1 14.04.2023 50 5043-5 14.04.2023 1 5043-4 14.04.2023 1 5043-3 14.04.2023 4 5043-1 14.04.2023 1 5041-3 14.04.2023 1 5041-1 14.04.2023 6 5040-3 14.04.2023 2 5038-4 14.04.2023 1 4991-1 14.04.2023 1 492 14.04.2023 2 485 14.04.2023 8 4814 14.04.2023 84 478 14.04.2023 30 472 14.04.2023 2 471 14.04.2023 10 468 13.04.2023 10 467 13.04.2023 30 465 13.04.2023 10 4647 13.04.2023 24 4645 13.04.2023 48 4614 13.04.2023 10 4575 13.04.2023 2 4450 13.04.2023 5 4245 13.04.2023 12 4224 13.04.2023 10 4207-2 13.04.2023 1 4132 13.04.2023 10 4119 13.04.2023 5 3895 13.04.2023 8 3868 13.04.2023 4 3863 13.04.2023 6864Views0likes3CommentsDax TIME restaurant transaction
I couldn't find a similar topic in the forum, so maybe someone can help me. I mean, I work in the restaurant sector. Document = Transactions, now we want to track the differences between account opening and closing times to see if employees are honest. The problem arises because it can not be calculated with a simple formula DateDIFF why?? because each receipt can have several items, as you know, you go to rest, you order many things, and for each item in the database there is a time which is then summed up and comes out stupid. Time DIFF measure is the stupid thing I came up with unfortunately 😞 As I calculated it is a simple formula in excel, the times are correct, however, I do not know how to build the measure so that it was counted correctly. I am adding screens so that you can see what data I have. Where it is " simple excel time formula" as you can see the values are reasonably correct but not. I will be much obliged for help how to solve this problem.Solved7.2KViews0likes11Comments