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.
Hi, I'm stuck on an issue where I have two tables, my dimdate table and another table (lifematics) which is missing a month column but contains a column for week number and a column for year. I'm trying to lookup the StartofWeek Date in my dimdate table by using the week number and year. My dimdate table also contains a week number and year column.
I tried to create a column with:
This is the lifematics table where I'm trying to add the date for StartofWeek from dimdate table.
Here is the dimdate table showing the columns I am looking up (red) and the one I am trying to return (blue)
I have been stuck on this for a few hours and would appreciate any help. Thank you.
Hi @nic88 ,
Is there any data which is from year 2022 in the table 'DimDate'? As checked the screenshot for the lifematics table, it seems that the data is for the year 2022. If there is some data in the table 'DimDate', both the formula which suggested by @Greg_Deckler and the below one can return the expected result...
Date =
CALCULATE (
MAX ( DimDate[Start of Week] ),
FILTER (
DimDate,
DimDate[Fiscal Year] = lifematics[year]
&& DimDate[Week of Year] = lifematics[weekNumber]
)
)
If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
@nic88 Try:
Date = MAXX(FILTER('DimeDate','DimDate'[Week of Year] = [weekNumber] && 'DimDate'[Fiscal Year] = [year]),[Start of Week])
@Greg_Deckler , thank you for your response. I tried the code you provided but the column seems to be blank.
It doesn't give me an error but the column doesn't have any values...
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 |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
147 | |
109 | |
107 | |
85 | |
63 |