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.
I need help defining a column to show Today's date minus 7 days and include all dates within that range. I've created the following columns, hoping I would find a way to get the correct syntax in one column but haven't been able to. NOTE: I've looked through all of the posts for ideas but nothing has worked so far.
Solved! Go to Solution.
You will need a calender table hooked to your fact table but then you can use a calculated column like this in your fact table.
Dates List = VAR RowDate = table[table date] RETURN CALCULATE(CONCATENATEX(DATES,DATES[Date],"| "),DATES[Date]<=RowDate,DATES[Date]>=RowDate-7)
Somthing like this?
Last 7 dates = CALCULATE(CONCATENATEX(DATES,DATES[Date]," | "),DATES[Date]<= TODAY() && DATES[Date] >= TODAY()-7)
Thanks for the help but the formula doesn't seem to work for me (and I've tried a few variations).
Also, I need my data in a column form rather than a row so CONCATENATEX may not work (since it outputs a row of dates).
Actual table and column name is:
You will need a calender table hooked to your fact table but then you can use a calculated column like this in your fact table.
Dates List = VAR RowDate = table[table date] RETURN CALCULATE(CONCATENATEX(DATES,DATES[Date],"| "),DATES[Date]<=RowDate,DATES[Date]>=RowDate-7)
Actually I do have a calendar table called 'Date' and it has a column called Dates which is linked to a fact table called 'Deals' and it's column 'lost_time'.
Thanks again for the help. I'll try to apply the formula you provided.
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |