Forum Discussion

obriaincian's avatar
obriaincian
Icon for Resolver I rankResolver I
2 years ago

Add measure to Line y-axis for Line and Clustered Column Chart - Not showing data

Hi All,

 

I have the below Line and Clustered Column Chart Visual.

 

What I want to do is add a line y-axis using a measure but when I implement it it doesn't show on the visual.

The blue line in the below visual is what I want to create, I have listed all the measures I am using below

 

 

Measures for x-Axis

I'm just using the date from a date table I created, I have relationships  created for the dates in the below measures with this the date column in the date table

 

Measures for Column y-Axis

 

Awaiting Approval Cumulative Revenue = 

VAR MaxDate = MAX(Data[Date to use AwaitingApproval_Approved])

RETURN
    CALCULATE(
        SUM(Data[Revenue]),
        FILTER(
            ALL(Data),
            Data[Label to use AwaitingApproval_Approved] <> "Approved" &&
            Data[Date to use AwaitingApproval_Approved] <= MaxDate &&
            Data[AwaitingApproval_Approved] <> BLANK()
        )
    )

 

 

 

Approved = 

VAR MaxDate = MAX(Data[Date to use AwaitingApproval_Approved])

RETURN
    CALCULATE(
        SUM(Data[Revenue]),
        FILTER(
            ALL(Data),
            Data[Label to use AwaitingApproval_Approved] = "Approved" &&
            Data[Date to use AwaitingApproval_Approved] <= MaxDocDate &&
            Data[Date to use AwaitingApproval_Approved] <> BLANK()
        )
    )

 

 

 

Measure I'm using for Line Y-Axis that is not working

 

 

Future Approval for Products with AwaitingApproval_Cumulative Revenue = 

VAR MaxDate = MAX(Data[Date to use AwaitingApproval_Approved Visual])

RETURN
    CALCULATE(
        SUM(Data[Revenue]),
        FILTER(
            ALL(Data),
            Data[Label to use DoC_CertIssued Visual] <> "Approved" &&
            Data[Future Approval Dates] <= MaxDate &&
            Data[Future Approval Dates]  <> BLANK()),
            USERELATIONSHIP(Future Approval Dates],'Date Table'[Date])
        )

 

 

 

Everything is working except the Measure I'm using for Line Y-Axis, please help!

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi obriaincian ,

    Is this measure you are using returning data properly? I'm not sure what your data looks like, can you provide me with simple data?

    In my tests, the measure is placeable on the Y-axis.

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

     

  • Anonymous ,

     

    Please see sample data below, I can't place the measure in the line y-axis

     

     

      Product    Date to Use AwaitingApproval_Approved    Label to use Awaiting Approval    Revenue  
      1    04/03/2023    Approved  151515
      2    06/07/2024    Not Approved  25915
      3    02/01/2022    Approved4552
      4    08/08/2024    Not Approved  554555
      5    02/05/2025    Approved4554554
      6    25/03/2024    Not Approved  44558