Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Merging two graphs with date as x axis

Hi all,    I'm trying to merge two graphs onto one to highlight some trends over the past year.    The data i'm using is safety certificates so each one has an expiry date and an issue date. I'm ...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

    You can create a Date table first and set date field of Date table as X axis for your column chart. Then create two measures as below:

     

    Count of rk_issuedate =
    CALCULATE (
        SUM ( table[rk] ),
        FILTER (
            ALLSELECTED ( table ),
            table[issue date] <= SELECTEDVALUE ( Date[date] )
        )
    )​
    Count of rk_expirydate =
    CALCULATE (
        SUM ( table[rk] ),
        FILTER (
            ALLSELECTED ( table ),
            table[expiry date] <= SELECTEDVALUE ( Date[date] )
        )
    )

     

    Best Regards