Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi all,
I want to dynamically show the N last periods in a line chart. I've read the SQLBI article, but that works with months and the DATESINPERIOD formule, which I cannot use because I use custom ISO periods.
Please help, I'm trying to use an offset column in my date table, which is set to 0 on the current period and counts back in the past. So 3 periods ago has offset -3
My current formula:
But this still shows everything in the chart, not just the last 3 periods. How do I correct this?
There is a single relationship between dimDate[Date] and trips[Date]
@Chaithanya6 , refer if these two from guyinacube can help
@Noeleke1301 , Try with this one change in var
VAR _LastPeriodWithData = CALCULATE( MAX( dimDate[Period Offset] ) , FILTER( allselected(dimDate) , dimDate[Date] <= MAX( trips[Date] ) ) )
User | Count |
---|---|
81 | |
75 | |
73 | |
42 | |
36 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |