Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
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:
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 52 | |
| 45 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 108 | |
| 106 | |
| 39 | |
| 33 | |
| 25 |