Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon'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.
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!
Solved! Go to 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:
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
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:
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:
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
User | Count |
---|---|
116 | |
73 | |
60 | |
48 | |
48 |
User | Count |
---|---|
171 | |
122 | |
60 | |
59 | |
56 |