Forum Discussion
Anonymous
7 years agoNot applicable
Display a stacked column chart visual with current year highlighted
Hi Consultants,
We have a requiremnt to highlight current year column in stacked column chart visual (like image below). When users land on this page it should automatically highlight current year column. Thanks in advance.
Cheers,
Sid
Hi Anonymous ,
You may need below similar measures.
current year = YEAR(TODAY()) column value = IF ( SELECTEDVALUE ( Table1[Date].[Year] ) = [current year], BLANK (), SUM ( Table1[Value] ) ) highlighted column = IF ( SELECTEDVALUE ( Table1[Date].[Year] ) = [current year], CALCULATE ( SUM ( Table1[Value] ), FILTER ( ALLSELECTED ( Table1 ), Table1[Date].[Year] = [current year] ) ), BLANK () )Drag corresponding field and measures into column chart and customize data colors to distinguish current year from others.
Best regards,
Yuliana Gu
1 Reply
- v-yulgu-msftMicrosoft Employee
Hi Anonymous ,
You may need below similar measures.
current year = YEAR(TODAY()) column value = IF ( SELECTEDVALUE ( Table1[Date].[Year] ) = [current year], BLANK (), SUM ( Table1[Value] ) ) highlighted column = IF ( SELECTEDVALUE ( Table1[Date].[Year] ) = [current year], CALCULATE ( SUM ( Table1[Value] ), FILTER ( ALLSELECTED ( Table1 ), Table1[Date].[Year] = [current year] ) ), BLANK () )Drag corresponding field and measures into column chart and customize data colors to distinguish current year from others.
Best regards,
Yuliana Gu