Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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
Solved! Go to Solution.
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.
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.
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")
)
)
)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.
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 38 | |
| 34 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 42 | |
| 30 | |
| 28 |