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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Neetu_2502
Regular Visitor

Change Year Into Quarter

Hi all, I am very new to Power BI. I need to Convert Year into Quarter to show it as a slicer and use it in Matrix. Please assist.

Neetu_2502_0-1709260649076.png

Neetu_2502_1-1709260838316.png

Instead of Years I need to use Q in the slicer

Neetu_2502_2-1709260903341.png

 

1 ACCEPTED SOLUTION

Hi @Neetu_2502 
I don't know if you took the Dax calendar or PQ, but the logic is the same.
For year quarter you can add a column with :
[Year] & " " & [Quarter] 

To sort this column you can add a column with the logic :

Ritaf1983_0-1709531219194.png

For descending sort at matrix column:

Ritaf1983_1-1709531268343.pngRitaf1983_2-1709531346460.png

The pbix is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

4 REPLIES 4
Neetu_2502
Regular Visitor

Thanks for your response!

I have created Datedimension table. Link helped.

I need to show Quarter and year as one slicer tile now, for instance 2023 q1, 2023 q2 etc.

Also, If I use Year field to Matrix from date dimension need the filed to be sorted in Desc order. Do I need to add another column as "sortorder"? if so how to add that.

How to do that

Hi @Neetu_2502 
I don't know if you took the Dax calendar or PQ, but the logic is the same.
For year quarter you can add a column with :
[Year] & " " & [Quarter] 

To sort this column you can add a column with the logic :

Ritaf1983_0-1709531219194.png

For descending sort at matrix column:

Ritaf1983_1-1709531268343.pngRitaf1983_2-1709531346460.png

The pbix is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

try creating a calendar like this

Screenshot_2.png

Ritaf1983
Super User
Super User

Hi @Neetu_2502 
The best practice is to create a Calendar table with all needed columns and work with it.

Please refer to the linked tutorial it also has a needed script.

https://radacad.com/do-you-need-a-date-dimension

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

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!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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