Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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
Data
Desired Result
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 !
User | Count |
---|---|
17 | |
17 | |
14 | |
13 | |
13 |
User | Count |
---|---|
17 | |
14 | |
14 | |
10 | |
8 |