Forum Discussion

salafoo's avatar
salafoo
Helper I
8 years ago
Solved

How to add data on a linear graph by two date

Hello All   I have a table of which has three columns A) Application Number B) Submission Date C) Approval Date    I want to make a graph as same as the below graph (Counting the number of sub...
  • OwenAuger's avatar
    8 years ago

    Hello,

     

    The typical way of handling this is to have a Date table, and create

    • An active relationship between one of your date columns (say Submission Date) and the Date table
    • And an inactive relationship between the other date column (say Approval Date) and the Date table

    Assuming the active relationship is with Submission Date, you would create measures something like this using USERELATIONSHIP to activate the inactive relationship (I'm assuming COUNTROWS makes sense as a measure):

     

    Submissions Count =
    COUNTROWS ( Submissions )
    
    Approval Count =
    CALCULATE (
        COUNTROWS ( Submissions ),
        USERELATIONSHIP ( Submissions[Approval Date], 'Date'[Date] )
    )

    See these two pages for good explanations:

    https://exceleratorbi.com.au/multiple-relationships-between-tables-in-dax/

    https://blog.enterprisedna.co/2017/10/16/working-with-multiple-dates-in-power-bi/