Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Solved! Go to Solution.
@AnonymousDid you create a relationship between your new calculated table and fact table?
A simpler and crude appoach would be to create a calculated column in your date dimension table called Period which will use a switch statement to spit out a period value. A crude vesion below:
Period =
SWITCH(TRUE(),
TODAY() - 'Date Table'[Date] <= 7, "Last 7 Days",
TODAY() - 'Date Table'[Date] <=30, "Last 30 Days",
"All period")
@Anonymous Glad it worked for you! Thanks for accepting it as solution!
Can you please post the fomula you are using? A common issue with date dimension with dates in fact table is if dates in fact table is defined as date-time, it may not match. You can try checking that by creating a table and a simple date dimension filter, whether it is filtering the fact table at all in the first place.
This is the formula I tried to use is there an easier way?
@AnonymousDid you create a relationship between your new calculated table and fact table?
A simpler and crude appoach would be to create a calculated column in your date dimension table called Period which will use a switch statement to spit out a period value. A crude vesion below:
Period =
SWITCH(TRUE(),
TODAY() - 'Date Table'[Date] <= 7, "Last 7 Days",
TODAY() - 'Date Table'[Date] <=30, "Last 30 Days",
"All period")
how do you create a calculated column in date table. Are you saying create this calculated column in the dimension table or the date table? Either way I dont know how to create the calculated column.
@Anonymous You will create this calculated column on yout Date Dimension table (which I presume is called 'Date Time').
It is simple to create a calculated column - you right click on table name and select New Column from thee menu. It will open up an area on top where you enter a DAX expression.
@sanimesa Ok sounds easy but what is the expession I need to write for the new column?
@Anonymous An example is in my earlier reply.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 18 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 63 | |
| 50 | |
| 46 | |
| 41 | |
| 39 |