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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
user_dil
Frequent Visitor

Hiding Values for the Current quarter

Hi,

I have a matrix table with quarterly growth values. In that, I want to hide the growth value for the current quarter. Once the quarter is completed, the growth value should appear dynamically.

Quarter Index goes as follows;

Apr-Jun: Q1

Jul - Sept: Q2

Oct-Dec: Q3

Jan - Mar: Q4

 

Thanks!

 

 

1 ACCEPTED SOLUTION

Hi , @user_dil 

According to your description, you want to get the quarter by custom.

For your need , you can try to add a calculated column in your date table like this:

Column = var _year = YEAR([Date])
var _month =  MONTH([Date])

return
SWITCH(TRUE() , 
_month>=8 && _month<=10 , _year*100 +1,
_month>=11 || _month=1 , _year*100 +2,
_month>=2 && _month<=4 , (_year-1)*100 +3,
_month>=5 && _month<=7 , (_year-1)*100 +4
)

The result is as follows:

vyueyunzhmsft_0-1686735704443.png

The "202301" means "2023-Q1" ; "202302" means "2023-Q2".

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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
Adescrit
Impactful Individual
Impactful Individual

Hi @user_dil 

You will need to create a calendar dimension table if you don't have one already.

In that calendar dimension table, create a Quarter Index column with this DAX:

Quarter Index = DATEDIFF( TODAY(), [Date], QUARTER )
 
Then on your matrix visual, add the quarter index column to the "Filters on this visual" section of the filter pane, and unselect Quarter Index "0", i.e. the current quarter.

Did I answer your question? Mark my post as a solution!
My LinkedIn

Hi @Adescrit 

 

This seems working for the given quarter ranges. In case of a different quarter range, how can I change the DAX?

Eg: Aug-Oct: Q1, Nov-Jan: Q2,...

Hi , @user_dil 

According to your description, you want to get the quarter by custom.

For your need , you can try to add a calculated column in your date table like this:

Column = var _year = YEAR([Date])
var _month =  MONTH([Date])

return
SWITCH(TRUE() , 
_month>=8 && _month<=10 , _year*100 +1,
_month>=11 || _month=1 , _year*100 +2,
_month>=2 && _month<=4 , (_year-1)*100 +3,
_month>=5 && _month<=7 , (_year-1)*100 +4
)

The result is as follows:

vyueyunzhmsft_0-1686735704443.png

The "202301" means "2023-Q1" ; "202302" means "2023-Q2".

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.