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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
AlanP514
Post Patron
Post Patron

Dynamic Title Measure

Here i need to Create one dax title measure

Now the year is 2023 IS SELECTED and month is Dec

So total we have 4 Quarter

 

I need to create one dax measure and it should be a dynamic

 

Use case

 

If the year 2022 is selected and Month is December I need to create one dax measure output "Q3" (it should be Dynamic Ie one quarter less that means from month selection if i select again september i need to show Q2 as output )

 

 

Expected end outPut should be like

 

"Sales Q3 with sales Selected Month (Decemeber 22)"
Here i am attaching the pbix file 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @AlanP514 ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a measure.

Measure = "Sales"&" "&"Q"&QUARTER(EOMONTH(MAX(Dim_Calendar[Date]),-3))&" "&"with"&" "&"sales"&" "&"Selected Month"&" "&MAX(Dim_Calendar[Month Name])&" "&MAX(Dim_Calendar[Year])

(3) Then the result is as follows.

vtangjiemsft_0-1676618420540.png

Best Regards,

Neeko Tang

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

2 REPLIES 2
shrabedi
Frequent Visitor

Hi @AlanP514 

I have tweaked @Anonymous DAX a little bit because I was facing a problem using that.

I added another measure to it.

Measure = "Sales"&" "&""&[Quarter Name Measure]&" "&"with"&" "&"sales"&" "&"Selected Month"&" "&MAX(Dim_Calendar[Month Name])&" "&MAX(Dim_Calendar[Year])

The following measure I made and called in the above measure.

Quarter Name Measure = 
VAR SelectedMonth = SWITCH(MAX(Dim_Calendar[Month Name]), 
    "January", 1, 
    "February", 2, 
    "March", 3, 
    "April", 4, 
    "May", 5, 
    "June", 6, 
    "July", 7, 
    "August", 8, 
    "September", 9, 
    "October", 10, 
    "November", 11, 
    "December", 12
)
RETURN
IF(
    SelectedMonth >= 1 && SelectedMonth <= 3,
    "Q4",
    IF(
        SelectedMonth >= 4 && SelectedMonth <= 6,
        "Q1",
        IF(
            SelectedMonth >= 7 && SelectedMonth <= 9,
            "Q2",
                IF(SelectedMonth >= 10 && SelectedMonth <= 12,"Q3")
            
        )
    )
)


1.PNG2.PNG3.PNG4.PNG
Anonymous
Not applicable

Hi @AlanP514 ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a measure.

Measure = "Sales"&" "&"Q"&QUARTER(EOMONTH(MAX(Dim_Calendar[Date]),-3))&" "&"with"&" "&"sales"&" "&"Selected Month"&" "&MAX(Dim_Calendar[Month Name])&" "&MAX(Dim_Calendar[Year])

(3) Then the result is as follows.

vtangjiemsft_0-1676618420540.png

Best Regards,

Neeko Tang

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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.