top of page

Power BI Desktop: using DAX (1)

When it comes to clarity a Power BI report has some annoying disadvantages. One complaint heard pretty often is: " the active filters in the report are not easy to identify".

That is mostly true as reports tend to be pretty complicated and the only thing you see when updating filters is some colors changing, some chart columns jumping around and some data suddenly appearing or disappearing.

Let's see how an easy DAX function (SELECTEDVALUES) can come to the rescue ....

Let us look at the following report. It's an HR report and as you see some filters are active. Which filters is another question.

Let's look at department (on the two doughnuts). It looks like HR is NOT selected, although on the first doughnut the headcount for HR states 2. Looks a bit puzzling.

An easy thing to do to figure this one out is to use some cards with the SELECTEDVALUE dax-function to monitor the filters.

Let's do that for the department. In our database the department field is called dept, the table tblPers.

Checking the presence of an active filter on department can be done with the following measure:

Selected Dept = SELECTEDVALUE(tblPers[Dept])

If you put that in a card visual you'll get the following result:

.. which means that, in this case, the 'ADMIN'department is selected and not 'HR'.

So basically what you could do is add some cards for all other possible filtered items like birthdate, country, ...

The result will be a report where data will be interpreted the right way, without any doubt about which filter is on or not.

Featured Posts
Recent Posts
Archive
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Social Icon
bottom of page