Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
mariag13011995
New Member

Power BI filter over 6 month and last 6 month

I would like to create a button filter in power bi that would allow me to show the values ​​that have been active for more than 6 months and those that have been active for less than 6 months, I will explain an example:

1.png

Then in Power Bi have a filter like this (This filter is not created, I have only posted an image of how I would like it to appear, but I don't know how to create it):

 

2.png

 

 

So when I click on "last 6 month" in the matrix will appear:

3.png

 

 

 

And if I click on "over 6 month" the matrix will change the data for:

4.png

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @mariag13011995 

 

You can try the following methods.

 

Column = IF(DATEDIFF([DATE],TODAY(),MONTH)<=6,"last 6 month","over 6 month")

 

vzhangti_0-1669969531494.png

Result:

vzhangti_1-1669969559984.png

vzhangti_2-1669969568800.png

Is this the result you expect?
DATEDIFF function (DAX) - DAX | Microsoft Learn

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @mariag13011995 

 

You can try the following methods.

 

Column = IF(DATEDIFF([DATE],TODAY(),MONTH)<=6,"last 6 month","over 6 month")

 

vzhangti_0-1669969531494.png

Result:

vzhangti_1-1669969559984.png

vzhangti_2-1669969568800.png

Is this the result you expect?
DATEDIFF function (DAX) - DAX | Microsoft Learn

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

FreemanZ
Super User
Super User

is period name a column?

No, I do not know how to create that filter, so is just an image that reflect how I would like this filter looks like

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.