Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
We have our production days from 7:00 AM to 6:59:59 AM the next day and production week starts at Saturday 7:00 AM and goes upto 6:59:59 AM next Saturday. I have set a custom date table that have date at 7:00 AM and corresponding week number.
I can set measures to First Date and Last date based on week selected. I need to pass these measures to production table and get data between these tables in a tabular list of all items produced during this time period based on user selected Week number.
How can I set these date measures to filter tble data?
Can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data? Like this (just copy and paste into the post window).
Column1 | Column2 |
A | 1 |
B | 2.5 |
if your production table has dates in the same format as in the date table then you just need a join between the tables on the date column
When you filter for a week it will automatically pass the first&last dates.
If your production table can have different values (e.g. different time) then I can help when you share the tables
Hi,
So your date table consists of one row pr day, right?
How does your data table look like? And what kind of date and time fields does the data table have?
If you data table contains something that needs to be summed or counted, you could do something like this:
Measure = CALCULATE ( SUM ( Table[Something] ); FILTER ( Table; Table[DateTime] >= MIN ( dimDate[DateTime] ) && Table[DateTime] <= MAX ( dimDate[DateTime] ) ) )
But it would probably be a better solution to create a link between you table and data dimension. This you can do by creating a separate date column in you data table, where rows where hours are between 00:00 and 07:00 is given the date of the previous day.
It would be easier to answer you questions if you add sample data or .pbix-file, there is a section about this in the guidelines:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
12 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
18 |