Controlling Month and Quarter Slicers in Power BI

Posted on by By Sohail, in Services | 0

Today let’s look into Controlling Month and Quarter Slicers, i.e Disable QTD Slicer on click of Type Slicer(Values are MTD and QTD) and versa

To my best of understanding, PowerBI revolves around The DataSet and its relationship so with that we will use that to our advantage.

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.

Get your 30 Days Trail Version

Prerequesite:

  1. Have your Date Dimension Ready,
  2. date dimension

  3. Have your Fact DataSet Ready which the Date Dimension can control
  4. dataset

My Key from dimdate to testdata is datekey(INTEGER) Format(YYYYMMDD)

Lets Create a constant DataSet (TYPE)that holds 2 Rows MTD and QTD

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.

Get your 30 Days Trail Version

constant dataset

Next we will create a Dim_Date_Level with the UNION of the same data, the difference are we going to have a Date Level to differentiate the UNION of the Same Data i.e first part of the UNION will have MTD and MTDKey values and the other part will have QTD and QTDkey

dime date level

Why because if we pass the value of MTD and MTDKey we won’t miss any dates from the table and also for QTD and QTDkey.

Now the most important part is the Relationship:

MTD key

We connect the Dim_Date_QTD (which has only QTD value) to the dimDateLevel which as both QTD and MTD values

And also Dim_Date_MTD (which has only QTD value) to the dimDateLevel which as both QTD and MTD values

Both in two ways and lastly connect to_date level to the Dim_Date_Level in One Way direction and from the Dim_date_level we connect to our fact

As you can see,
dim date level

Power BI

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.

Grab The 30 Days Free Trail

QTD is selected and we can’t find the Month Name now if we select MTD we should only get Month value Names

Power BI


Thanks
Sohail Izebhijie
Helical IT Solutions Pvt Ltd

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments