Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
I want to display Year & Quarter in same axis for my Clustered Column chart however only when it is current year and for remaining past and future years It should display only year value..
Is this possible via DAX I am using DirectQuery connecting to SQL server on premise
Also have fiscal date calendar table which will have from date,week,month,quarter & year information
Thanks in Advance
Archer
Solved! Go to Solution.
You can add a column to your date table something like.
Column =
IF(
'Calendar'[CalendarYear] = YEAR( TODAY() ),
'Calendar'[CalendarQuarter],
'Calendar'[CalendarYear]
)
You can add a column to your date table something like.
Column =
IF(
'Calendar'[CalendarYear] = YEAR( TODAY() ),
'Calendar'[CalendarQuarter],
'Calendar'[CalendarYear]
)
Thanks for your tip ... it worked but how do I sort this data unable to figure it out
You can add a sort column
Column =
IF(
'Calendar'[CalendarYear] = YEAR( TODAY() ),
( 'Calendar'[CalendarYear] * 10 ) + 'Calendar'[CalendarQuarter],
'Calendar'[CalendarYear] * 10
)
Great thanks a lot for your solution
Column =
IF(
'Calendar'[CalendarYear] = YEAR( TODAY() ),
( 'Calendar'[CalendarYear]) + " - Q" + 'Calendar'[CalendarQuarter],
'Calendar'[CalendarYear]
)
When I try the above to label it properly it throws an error
"Expressions that yield variant data-type cannot be used to define calculated columns"
How can I handle this to show 2020-Q1
Okay I have figured this out by converting the number columns to text from PowerQuery and then it did let me create calculated column .. Phew and Yay !
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
21 | |
21 | |
13 | |
12 |
User | Count |
---|---|
43 | |
28 | |
25 | |
23 | |
22 |