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
HI...I need help!!
I need to clasified my date column by period (current and prev). Each period is from day 6th to day 5th(next month).
I need just to show the last two period.
Example:
from: 2/5/2020 to: 3/6/2020 = prev_period
from: 3/6/2020 to: 4/5/2020 = current period
In 4/6/2020 change:
from: 3/6/2020 to: 4/5/2020 - prev_period
from: 4/6/2020 to 5/5/2020 - current
Any suggest? If need more detail just tell me.
Solved! Go to Solution.
@SQUILES ,
I think it needs just an adjustment:
Period =
Ricardo
@SQUILES ,
I just changed the code, try it again:
can you explain a bit more about how you are using this. are you wanting a text column called previous period or are you wanting a value for the previous period, some dummy data with an example of what you want to end up with will be really useful.
Proud to be a Super User!
I want a text column called period (current or prev) . Today is 3/31/2020, the range is:
prev = 2/6/2020 - 3/5/2020
curr = 3/6/2020 - 4/5/2020
When date reach 4/6/2020, the new range
prev = 3/6/2020 - 4/5/2020
curr = 4/6/2020 - 5/5/2020
Hi @SQUILES ,
Try this code for calculated column:
Thanks @camargos88,
i try something like that using today(), but give me a prev period 4/1/2020 when supose to give me current period.
Current period runs from 3/6/2020 to 4/5/2020.
@SQUILES ,
I think it needs just an adjustment:
Period =
Ricardo
@camargos88 , is work, but i think i can't use today(), to calculated the range, beacuse today()=4/1/2020, and 4/1/2020 is supose to be in current period (current 3/6/2020 - 4/5/2020).
@SQUILES ,
I just changed the code, try it again:
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 |
|---|---|
| 61 | |
| 52 | |
| 47 | |
| 41 | |
| 38 |