This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi All,
I have an exisitng measure that works well - it is based on a number of "IF" statement and in the end calculates the accuracy of a forecast.
Forecast accuracy Consensus = if(sum('Region consolidated data'[Total demand])=0 && sum('Region consolidated data'[ABS deviation consensus])<>0,0,if(1-DIVIDE(
I can filter the data to only show the last 3 months, 6 months etc. through the date slicer.
However, I would also like to have a "static" measure for the last 3 month, 6 months and 12 months to be able to show these side by side in a table.
Can anyone advise on how I can create "new" measures based on above but limited to the mentioned time periods?
Thanks!
Solved! Go to Solution.
You could create a calculation group with calculation items for each period you want to show, e.g.
3 months =
VAR StartDate =
EOMONTH ( TODAY (), -4 ) + 1
RETURN
CALCULATE (
SELECTEDMEASURE (),
'Date'[Date] >= StartDate
&& 'Date'[Date] <= TODAY ()
)
You should ditch your IF's in favour of SWITCH. Second, creating a 'static' measure is simple - use the right filters on your existing measures.
You could create a calculation group with calculation items for each period you want to show, e.g.
3 months =
VAR StartDate =
EOMONTH ( TODAY (), -4 ) + 1
RETURN
CALCULATE (
SELECTEDMEASURE (),
'Date'[Date] >= StartDate
&& 'Date'[Date] <= TODAY ()
)
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 7 | |
| 6 | |
| 6 |