The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a client request about displaying a table with the last two weeks (today included) as the default. I have tried messing around with slicers but never managed to have them both work together as one would nee dot be offsetting the other. While searching for options I stumbled upon a possible way around it, creating a custom table with two rows, one being a last two weeks and the other all.
Then a measure was used to calculate such value and turn it into a filter. However, on that formula I'm having issues replacing the generic table/column names. If anyone could point me out in the right direction or have another solution, I'd be thankful.
Below is the measure formula:
Measure = IF(SELECTEDVALUE('Table (3)'[default value])="!previous 45 days",CALCULATE(SUM('Main table'[Value]),FILTER('Calendar',[Date]<=TODAY()&&[Date]>=TODAY()-44)),SUM('Main table'[Value]))
Hi @AmazingRandom ,
You can use a disconnected dates table and a measure to filter just the last two weeks of dates. This approach if the date column is in a table or used as row header in a matrix is it behaves unexpectedly when used as column header when other dimension columns are added. The other approach is to create a modified table that has a date column and another dates column containing the last two weeks of date referencing the currrent row in the original date column something like below:
Please see attached pbix for your reference.
Proud to be a Super User!
It is not working for me, I set up the tables but when I apply the filter to my table it returns nothing
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
80 | |
75 | |
52 | |
50 |
User | Count |
---|---|
133 | |
124 | |
78 | |
64 | |
61 |