Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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 !
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
19 | |
18 | |
18 | |
15 |
User | Count |
---|---|
38 | |
20 | |
18 | |
16 | |
10 |