Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Use Measure to return multiple values for a line graph

I have this measure below which returns a value based on slicers. It works well and currently returns 'All Projections'[FORECAST] to be on a line graph. Is there any way I can change this measure so that it can return TWO values to make two lines? In addition to [FORCAST] I also have [COUNTS] as a separate column in the same table.

 

Thanks!

 
counts_forecast =
      VAR sitecount =
              CALCULATE (
                         DISTINCTCOUNT ( 'All Projections Bridge'[site number] ),
                         ALLSELECTED ( 'All Projections Bridge' ),
                         ALLSELECTED ( 'All Projections Legend' )
    )
VAR proccount =
         CALCULATE (
                   DISTINCTCOUNT ( 'All Projections Bridge'[procedure number] ),
                   ALLSELECTED ( 'All Projections Bridge' ),
                   ALLSELECTED ( 'All Projections Legend' )
    )
VAR levelnum =
         SWITCH ( TRUE ()sitecount = 13proccount = 121 )
RETURN
         CALCULATE (
                    SUM ( 'All Projections'[FORECAST] ),
                    'All Projections Legend'[Level] = levelnum
    )

3 Replies