Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have measures allready created which shows percentage data, what I am wanting is 3 cards.
A card that shows this currents calendar months percentage data.
A card that shows the last calendar months percentage data.
A card that shows the previous calendar months percentage data.
Now the data I have does go over previous fiscal years. I am assuming the measure that will be created for the 3 above can simply be dragged and dropped on to the "Filters to visual" which will allow these to be done.
The objective here is these for these to automaticly calculate this month, last month and previous to last months data without the need for manual change.
Any help is greatly appreciated 🙂
I would create a calculation group with 3 calculation items, then put that calculation group on the card visuals and pick the appropriate item.
Current Calendar Month =
CALCULATE (
SELECTEDMEASURE (),
CALCULATETABLE (
DATESMTD ( 'Remote Date'[Date] ),
TREATAS ( { TODAY () }, 'Remote Date'[Date] )
)
)
Last Calendar Month =
VAR CurrentDate =
TODAY ()
VAR StartLastMonth =
EOMONTH ( CurrentDate, -2 ) + 1
VAR EndLastMonth =
EOMONTH ( StartLastMonth, 0 )
RETURN
CALCULATE (
SELECTEDMEASURE (),
DATESBETWEEN ( 'Date'[Date], StartLastMonth, EndLastMonth )
)
Prev Calendar Month =
VAR CurrentDate =
TODAY ()
VAR StartPrevMonth =
EOMONTH ( CurrentDate, -3 ) + 1
VAR EndPrevMonth =
EOMONTH ( StartLastMonth, 0 )
RETURN
CALCULATE (
SELECTEDMEASURE (),
DATESBETWEEN ( 'Date'[Date], StartPrevMonth, EndPrevMonth )
)
@johnt75 - I have tried using the above measures but they have not worked. I have added in the measures that are appropiate for my report at the DATESBETWEEN bit.
Also where it is SELECTRED MEASURE... am I suppose to be putting in the measure I am want calculating for the previous/current months data between those brackets?
They are not regular measures, they are calculation items. You need to use Tabular Editor to create a calculation group and then add the above code as calculation items. You can then add the calculation group to the filter for your visuals and choose the appropriate calculation item.
@johnt75 I am restricted so therefore cannot use the Tabular Editor. If you or anyone knows of any alternate ways I can do this, then please let me know.
You'll could create separate measures for each. Just replace SELECTEDMEASURE() in my code with the actual measure you want to calculate.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
10 | |
6 |