dax division with date
3 TopicsGet the average of a column value based on total count of values in ID column
Hi, In a table i have column called "Object" which runs multiple times in a day and that runtime is captured in "StartTime" & "EndTime" columns, and the difference between the start and end time is captured in the "Duration" Column. Each object will be having multiple runid's which is captured in "RunID" column which is a unique value. For eg: Object AAA has two runid's called "111,222" and Object BBB has one runid called "333". Now i would like to get the average of each duration by count of that particular runid which is captured in "New Duration" column. For eg: The count of 111 runid is '10'. so for all those durations with runid 111 should be divided by the 10. The count of 222 runid is '6'. so for all those durations with runid 222 should be divided by the 6. The count of 333 runid is '8'. so for all those durations with runid 333 should be divided by the 8. Sample screenshot for above query: So since my Duration is "10" and total count of runid (111) is 10. So 10/10=1 that is my newduration.Similarly for all durations with runid's 111 should be divided bt 10. How to achieve this using DAX query?? I am connecting to this table in powerbi via SQL direct query mode. Thanks.Solved1.1KViews0likes2CommentsDAX calculated columns to create Date Tables
Hi All, I need to create a Date Table [Data Table] using any possible DAX measures or DAX calculated columns. I need the output in the below expected format.Please suggest. so I basically want to show current month, year, previous month along with the month start and end dates. I want it for the whole year for 2021,2022 and 2023..Please suggest Current Month Year CurrentMonthStart CurrentMonthEnd Previous Month PreviousMonthStart PreviousMonthEnd January 2022 01-01-2022 31-01-2022 December 01-12-2021 31-12-2021 February 2022 01-02-2022 28-02-2022 January 01-01-2022 31-01-2022 March 2022 01-03-2022 31-03-2022 February 01-02-2022 28-02-2022 April 2022 01-04-2022 30-04-2022 March 01-03-2022 31-03-2022 May 2022 01-05-2022 31-05-2022 April 01-04-2022 30-04-2022Solved1.9KViews0likes5CommentsHow do I create a Dax formula with a date value as the denominator?
I have a requirment where the vendor wants a measure divded by the month number. "Abs Perc of Error (Demand Forecast) / by the month number Example: Jan Abs Perc of Error (Demand Forecast) / 1, Feb Abs Perc of Error (Demand Forecast) / 2, etc" When I try to create the DAX Measure the date denominator will not poplulate or if I try to use Quick Measure it wants to add sum or another aggregation. This a quick measure: Demand Forecast divided by MonthNum = DIVIDE([Demand Forecast], SUM('DimDate'[MonthNum])) Any guidance would be apprciated!647Views0likes3Comments