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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! 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:
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 135 | |
| 102 | |
| 67 | |
| 65 | |
| 56 |