Forum Discussion
Line chart customisation
- Anonymous1 year ago
Hi Fali324
Certainly, please check the following changes:
Change the x-asix Table:
X-axis = UNION ( VALUES ( 'Table'[Project] ), SELECTCOLUMNS ( VALUES ( 'Table'[Project] ), "Project", "Select-" & 'Table'[Project] ) )And so do the Measure:
MEASURE = VAR _Slicer = VALUES ( Slicer[Project] ) VAR _length = MAXX ( ADDCOLUMNS ( 'X-axis', "Length", LEN ( 'X-axis'[Project] ) ), [Length] ) - 7 VAR _CurrentPro = SELECTEDVALUE ( 'X-axis'[Project] ) RETURN IF ( _CurrentPro IN VALUES ( 'Table'[Project] ), CALCULATE ( SUM ( 'Table'[Duraction] ), 'Table'[Project] = _CurrentPro ), IF ( ISFILTERED ( Slicer[Project] ), CALCULATE ( SUM ( 'Table'[Duraction] ), 'Table'[Project] IN _Slicer && 'Table'[Project] = MID ( SELECTEDVALUE ( 'X-axis'[Project] ), 8, _length ) ) ) )Then select all the selections of the Slicer and Open all the lines of the selections with "Select-":
You can alse change the Color:
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Can this be altered if multiple projects are selected?
Hi Fali324
Certainly, please check the following changes:
Change the x-asix Table:
X-axis =
UNION (
VALUES ( 'Table'[Project] ),
SELECTCOLUMNS (
VALUES ( 'Table'[Project] ),
"Project", "Select-" & 'Table'[Project]
)
)
And so do the Measure:
MEASURE =
VAR _Slicer =
VALUES ( Slicer[Project] )
VAR _length =
MAXX ( ADDCOLUMNS ( 'X-axis', "Length", LEN ( 'X-axis'[Project] ) ), [Length] ) - 7
VAR _CurrentPro =
SELECTEDVALUE ( 'X-axis'[Project] )
RETURN
IF (
_CurrentPro IN VALUES ( 'Table'[Project] ),
CALCULATE ( SUM ( 'Table'[Duraction] ), 'Table'[Project] = _CurrentPro ),
IF (
ISFILTERED ( Slicer[Project] ),
CALCULATE (
SUM ( 'Table'[Duraction] ),
'Table'[Project]
IN _Slicer
&& 'Table'[Project] = MID ( SELECTEDVALUE ( 'X-axis'[Project] ), 8, _length )
)
)
)
Then select all the selections of the Slicer and Open all the lines of the selections with "Select-":
You can alse change the Color:
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.