Total Previous Month as card i.e. no filter context

Used for anything related to the new Power BI Desktop and Service tools
major
Posts: 13
Joined: Tue Mar 15, 2016 11:28 pm

Total Previous Month as card i.e. no filter context

Postby major » Fri Jul 08, 2016 11:02 pm

How do I display the previous month's total value (sales, units, whatever) as a Card visual in PowerBI, where there is no external filter context?

So nothing like a column chart with axis showing month/year. Just a solitary number.

I know I need to get the filter context into the formula but I can't get the answer. Please help!

MattAllington
Posts: 881
Joined: Sun May 04, 2014 4:01 pm
Location: Sydney, Australia

Re: Total Previous Month as card i.e. no filter context

Postby MattAllington » Wed Jul 13, 2016 7:24 pm

Well there is a filter context. It is just that is sounds like you are not interacting with it.

Do you have a formula to get the current month's total value that works? My normal approach would be to have an ID column for the months in my calendar table. Read about ID columns and how to use them here http://exceleratorbi.com.au/power-pivot ... ar-tables/

Then assuming you have a measure that shows the latest month value, I would write a measure like this

Matt Allington is Professional Self Service BI Consultant, Trainer and Author of the book "Learn to Write DAX". You can hire me at http://Exceleratorbi.com.au
http://exceleratorbi.com.au/what-is-power-pivot/
http://xbi.com.au/learndax

major
Posts: 13
Joined: Tue Mar 15, 2016 11:28 pm

Re: Total Previous Month as card i.e. no filter context

Postby major » Fri Jul 15, 2016 6:18 am

Thanks Matt.

Works perfectly.


Return to “Power BI Desktop/Service”

Who is online

Users browsing this forum: No registered users and 0 guests