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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
naga449
Frequent Visitor

How to display quarter Months name Axis.

Hi Community,

 

I have one requrement , they want to show Quarter months name in axis as discribed below

 

i.e  for Q1, (if jan , feb and Mar data avalible in Source file then it should display axis as (Jan-Mar 21)

 

if for Q2, if data avalibe for Apr only then axis should be (Apr 21)

naga449_0-1622565742333.png

 

,if  Apr and May data avalible then axis should display as (Apr-May 21), if data avalible for Apr, May and Jun axis should be (Apr-Jun 21)

Same for all Quarters

Could spme onle Please help me with This requirement.

 

Thanks ,

Naga Karthik

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @naga449 ,

 

The result is this

Screenshot 2021-06-03 165706.png

 

First add a quarter column and month column, and then find the largest month and smallest month of each quarter, and merge them.

Quarter = [Date].[Quarter]
Month = FORMAT([Date],"MMM")
Quarter Month Name = 
VAR _MaxMonth =
    CALCULATE (
        MAX ( 'Table (2)'[Month] ),
        FILTER ( ALL ( 'Table (2)' ), [Quarter] = EARLIER ( 'Table (2)'[Quarter] ) )
    )
VAR _MinMonth =
    CALCULATE (
        MIN ( 'Table (2)'[Month] ),
        FILTER ( ALL ( 'Table (2)' ), [Quarter] = EARLIER ( 'Table (2)'[Quarter] ) )
    )
RETURN
    IF (
        _MaxMonth = _MinMonth,
        _MaxMonth & " "
            & YEAR ( [Date] ),
        _MinMonth & "-" & _MaxMonth & " "
            & YEAR ( [Date] )
    )

Screenshot 2021-06-03 165947.png

 

You can check more details from the attachment.

 

 

Best Regards,

Stephen Tao

 

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

5 REPLIES 5
v-stephen-msft
Community Support
Community Support

Hi @naga449 ,

 

The result is this

Screenshot 2021-06-03 165706.png

 

First add a quarter column and month column, and then find the largest month and smallest month of each quarter, and merge them.

Quarter = [Date].[Quarter]
Month = FORMAT([Date],"MMM")
Quarter Month Name = 
VAR _MaxMonth =
    CALCULATE (
        MAX ( 'Table (2)'[Month] ),
        FILTER ( ALL ( 'Table (2)' ), [Quarter] = EARLIER ( 'Table (2)'[Quarter] ) )
    )
VAR _MinMonth =
    CALCULATE (
        MIN ( 'Table (2)'[Month] ),
        FILTER ( ALL ( 'Table (2)' ), [Quarter] = EARLIER ( 'Table (2)'[Quarter] ) )
    )
RETURN
    IF (
        _MaxMonth = _MinMonth,
        _MaxMonth & " "
            & YEAR ( [Date] ),
        _MinMonth & "-" & _MaxMonth & " "
            & YEAR ( [Date] )
    )

Screenshot 2021-06-03 165947.png

 

You can check more details from the attachment.

 

 

Best Regards,

Stephen Tao

 

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

Hol good afternoon

I applied the indications but I have a problem when presenting the months of the quarter, since although the January-March quarter is presented correctly "Jan-Mar", in the other quarters this does not happen, April-June appears as "Apr-May", July-September as "Aug-Sep" and October-December as "Dec-Oct". I appreciate any help you can give me.

CCV_0-1677275813198.png

Quarter Name =
WHERE _MaxMes=
CALCULATE(
.MAX(Calendar[month name]),
FILTER(ALLSELECTED(Calendar),[Quarter]= EARLIER(Calendar[Quarter]))
)
WHERE _MinMes =
CALCULATE(
MIN(Calendar[month name]),
FILTER(ALLSELECTED(Calendar),[Quarter]=EARLIER(Calendar[Quarter]))
)
RETURN
IF (
_MaxMes=_MinMes,
_MaxMes & " ",
_MinMes & "-" & _MaxMes & " "
)

Hi Stephen , 

 

Thanks for your Help in finding the resolution, You Have given me the idea to resolve the Issue . But my issue resolves with below dax .

 
Quarter Month Name1 =
VAR _MaxMonth =
CALCULATE (
MAX ( Calender[Date]),
FILTER ( ALLSELECTED ( Calender ), [Quarter] = EARLIER ( Calender[Quarter]) && [Year]=EARLIER(Calender[Year]))
)
Var _maxmonth1 = FORMAT(_MaxMonth,"MMM")
VAR _MinMonth =
CALCULATE (
MIN ( Calender[Date]),
FILTER ( ALLSELECTED ( Calender), [Quarter] = EARLIER ( Calender[Quarter] ) )
)
Var _minmonth1 = FORMAT(_MinMonth,"MMM")
RETURN
IF (
_maxmonth1 = _minmonth1,
_maxmonth1 & " "
& YEAR ( Calender[Date] ),
_minmonth1 & "-" & _maxmonth1 & " "
& YEAR ( Calender[Date] ))
naga449_0-1623665775202.png

 Thanks ,

Naga Karthik

Hi @naga449 ,


Sorry to disturb you...


But did I answer your question ? Please mark my reply as solution. Thank you very much.

 

Best Regards,
Stephen Tao

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.