hannesh
hannesh

Reputation: 512

How to create a PowerBI gauge displaying data for the current month?

I'm trying to create a gauge element that would always display values for the current month. I can create the elements and manually select for example 2/2016 but I would like it to just always display data for the current month (i.e. 3/2016 next month).

I can create a measure to retrieve the MaxDate but i cannot use that in a slicer of figure out how I could use the data with filters etc.

Any ideas on how this kind of logic could be implement it?

enter image description here

Upvotes: 0

Views: 2960

Answers (1)

Lukasz P.
Lukasz P.

Reputation: 2229

You'll want to use the Power BI Desktop to edit your data model as follows: 1) create a DAX Measure 2) Use the Calculate function to calculate your data point. 3) In your Calculate set a filter so that the MonthYear 4) Use that new measure in your guage

You will also want to create new measures for: A) Target value B) Max value

These you'll wire into your gauge so that you don't get the annoying - my gauge is always at the 50% mark issue :).

Some useful references you might want to consult: https://wouterbasson.wordpress.com/2011/01/12/filtering-the-current-period-using-dax/ http://www.daxpatterns.com/

Upvotes: 3

Related Questions