Forum Discussion

Hifni93's avatar
Hifni93
Frequent Visitor
3 years ago
Solved

two different Dates count in one dashboard

hello Community  i have my table withe the following columns Assetnum(identity),claasification, Arrival date(year) , Decomissioning date(year)  what i am trying to do is to have the count of dates ...
  • rbriga's avatar
    3 years ago

    Have a single calendar table with each date a unique value.

    Create two relationships between your fact table and your calendar table:

    1. Calendar[Date] ---> Fact[Arrival Date] (one to many)
    2. Calendar[Date] ---> Fact[Decomissioning Date] (one to many) Inactive

    Then you can have two measure to display on the same chart:

    Rows (Arrival) = COUNTROWS('Fact Table Name')

    And

    Rows (Decommission) = Calculate(COUNTROWS('Fact Table Name'), USERELATIONSHIP('Calendar'[Date],'Fact Table Name'[Decommission Date]))

    This should do it- you switch the relationship within the DAX measure, without a duplicate calendar table.

  • rbriga's avatar
    rbriga
    3 years ago

    Note that this is a stacked area chart. This is the expected behavior.

    Either:

    1. Change into a (non-stacked) area chart 

    or 2. Switch the order of the measures in the visualization pane: