"date table"
18 TopicsDAX to flatten incoming sales forecast by month with correct subtotals
I have a dataset that projects incoming sales forecast but the day of the month the forecast is projected for is not accurate to when the sales will actually occur. I want to "smooth" the forecast data by calculating the average for the month and assigning it to each day. The ultimate goal is to be able to calculate totals based on past real data and future forecast data and be able to have the subtotals calculate correctly even when "today" is within the summarized period of time. At the moment I am able to get the "Daily Average Forecast" and assign it to the first day of the month, but I am struggling to have it apply to each day of the month and to get the sub-total to be a sum of the previously calculated daily values. I would share code I have written so far but I have tried so many permutations of SUMMARIZECOLUMNS and SUMX that I can't remember what worked best already. I am using Melissa de Korte's Extended Date Table and have Time Intelligence switched off in my model and implicit calculations are disabled.Solved998Views0likes7CommentsDate slicer label not working on table
Hello, Power BI experts...., I have a visual that have slicer date_2 as follow, in the example I choose "February" as month and "2025" as year. I then make a measure of CurrentMonth MTD = LASTDATE(Date_2[Date]) When I test the measure on card visual, it shows end of February, as expected However, when I put the measure on a column in the table as follow, it instead show "Dec 2025" not "Feb 2025", the slicer didn't seem to work on the table The endgoal is to make the label shown on x-axis of a line and clustered Is there any workaround to make the label can follow the slicer. This is quite frustrating since I have got all the amount on the visual correct following the slicer, but not the date label. Thank you in advance!1.3KViews0likes8CommentsCalculate sum of items based on date range and avaliable stock
Hey everyone, hope you all well. I'm new in the power bi, and having lots of trouble allready, can you help me with a situation? I need to set a status to the items of different orders based on its date and comparation between the stock and the quantity needed. Example: i have three tables called: date, with comun: date; orders, with columns: order number, item, quantity and date; and stock that has columns: item, quantity. they have for example the following data: Table date: date 01/01/25 02/01/25 03/01/25 Table stock: item quantity aaa 20 bbb 10 Table orders: Order num Item quantity date 111 aaa 20 01/01/25 111 bbb 10 01/01/25 222 aaa 10 02/01/25 333 aaa 20 03/01/25 333 bbb 2 03/01/25 i need a way of creating a graphic table to show, as i select a range of date in data segmentation for example: i select a range from 02 to 03/01, then based on the available stock, the status of the order number 222 will be: item aaa"available", and the other 333 item aaa will be "out" and the order 333 item bbb will be "available" but if i do not select any range and leave it all the dates selected, it will be: order 111, items aaa and bbb will be atatus "available" and the others will be "out". I also need a way to count all the "available" and "out" and i need to be able to select if i wanna se only the evailable or the out status. i don't know if i made myself clear, but could you help me please? Thankyou a lot.Solved2.6KViews0likes7CommentsAdding Calculated Column to Date Table based on Date Ranges in Another table
Hi All, I am looking for some help adding a column to my date table based on date start and end found in another table. What I am trying to do is to add a column to my date table which specifies for each date in the table, which semester it falls into. The dates for each semester can be found in the Semester Date table. There is a start and end date for each semester. I have tried to adapt the solution found in another post. The issue I am having is that the column is currently only returning the final semester found in the Semester Date table. The DAX I have is Semester Date = VAR _a = SELECTEDVALUE ( 'Date'[Date] ) RETURN CALCULATE ( MAX( 'Semester Dates'[Academic Semester]), FILTER ( ALL ( 'Semester Dates' ), 'Semester Dates'[Start]>= _a && _a <= 'Semester Dates'[End] ) ) Date Table; Semester Date Table; Any help would be greatly appreciated. Many thanksSolved666Views0likes2CommentsWeek per month that starts over every 4 weeks
I want to count each sales week of the month from 1 to 4, so that I can apply a color to the week ( 1 = red, 2 = blue, etc.). Here's what I tried so far, which works up until the end of February. I want to restartt the count from 1 to 4 for the week numbers as shown in the table below. Thanks for your time. "Week Ending", [Date] - WEEKDAY( [Date], 1) + 7, // Use the last week number of month to reset the counting, min week number = 1, max week number = 4 "Week in Month", IF( WEEKNUM( [Date]) > 4, WEEKNUM( [Date] ) - 4, WEEKNUM( [Date])) Date Week in Month Desired Week in Month 2/18/2024 4 4 2/19/2024 4 4 2/20/2024 4 4 2/21/2024 4 4 2/22/2024 4 4 2/23/2024 4 4 2/24/2024 4 4 2/25/2024 5 1 2/26/2024 5 1 2/27/2024 5 1 2/28/2024 5 1 2/29/2024 5 1 3/1/2024 5 1 3/2/2024 5 1 3/3/2024 6 2 3/4/2024 6 2 3/5/2024 6 2 3/6/2024 6 2 3/7/2024 6 2 3/8/2024 6 2 3/9/2024 6 2Solved1.2KViews0likes3CommentsReturn date value from date table that is X number of FILTERED dates away
Hello! I need some help with a DAX formula please! I need to return a Calculated Ship Date column. This is based on Order Date + X number of working days. My date table has each date indicated as a working day Y/N (actually it is 1 or 0). How can I use the date table, start with my Order Date and move up X rows where WorkingDay = 1 and return that date? For example - I need to add a column to my data table called "Calculated Ship Date" and it should return 1/9/24. My Data Table OrderDate Location Working Days Calculated Ship Date 1/4/24 USA 3 1/9/24 DateTable Date USA WorkingDay Asia WorkingDay 1/4/24 1 1 1/5/24 1 1 1/6/24 0 1 1/7/24 0 0 1/8/24 1 0 1/9/24 1 1Solved481Views0likes1CommentPBI Server- Date format issue
Hi everyone, I am currently faced with date issues, from PBI desktop to PBI Server (on-premise). How can i show it as dd/mm/yyyy without changing the browser configuration? Can it be solved by creating another calculated column or can be done in the transformation tab? For example, this application date is showing as 14/03/2001 (dd/mm/yyyy). (PBI Desktop) However, when showed on PBI Server, the application date is showing as (mm/dd/yyyy). (PBI Server on premise) Thank you.382Views0likes0CommentsMeasure dosen't work with date hierarhy
Hi ! Task : I need to filter the visualization table. Show records whose creation date falls within the date range from the slicer. need to use date hierarchy in slicer (screenshot attached). it should be possible to select the year, apartment, month, week I have a date dimension table that has no links to a records table. so I'm trying to create a measure that will help filter the records. I managed to filter using slicer "between" without hierarchy date. 1. How slicer should look like: 2. Code which i try to make it work : MAX_DATE = VAR year_max = MAX( VW_DIM_DATE[YEAR]) VAR month_max = MAX( VW_DIM_DATE[MONTH_ID]) VAR day_max= MAX( VW_DIM_DATE[DAY_OF_MONTH] ) RETURN DATE ( year_max,month_max,day_max ) MIN_DATE = VAR year_min = Min( VW_DIM_DATE[YEAR]) VAR month_min = Min( VW_DIM_DATE[MONTH_ID]) VAR day_min= Min( VW_DIM_DATE[DAY_OF_MONTH] ) RETURN DATE ( year_min,month_min,day_min ) _NonClassificationSitesInDateRange1 = CALCULATE( DISTINCTCOUNT(VW_DIM_SITES[EXISTING_RESOURCE_ID]), DATESBETWEEN( VW_DIM_SITES[SITE_CREATION_DT], [MIN_DATE], [MAX_DATE] ) ) The last measure was put in table, but it doesn't work correctly. I have creation date from 2015 to 2023 years but it works only when the date range includes 2023 year. Could you please help me with this issue or suggest any other solutions?276Views0likes0CommentsCant create relationship between Date and Calender[Date] .
now i have multiple tables CFS_Import , CFS_Export and CL now i have one more table name List , so i have created relationship between These three tables and the List table , now i when i create a new table named Calendar which contains only Date column , i want to link all the three table Date column with this column , so that when i drag this Calendar[Date] in any slicer it can act as a unified date slicer or when i drag it to x-axis of any line chart and add revenues of different table it will work 'fine , but i am only able to make relationship between one of the table and the rest two table's relationship turns inactive and when i try to turn it active it gives error for ambiguity.545Views0likes1Comment