Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Problem with union (selectcolumns

Tablemeasure = Union( selectcolumns(Table A,"Opening_Date", Table A[Opening_Date]), selectcolumns(Table B,"Business_Date", Table B[Business_Date]), ) I created a measure using this format above bu...
  • AmiraBedh's avatar
    2 years ago

    If you need a list of dates for a visual, create a calculated table instead of a measure :

    CombinedDatesTable = UNION(
        SELECTCOLUMNS(TableA, "Date", TableA[Opening_Date]),
        SELECTCOLUMNS(TableB, "Date", TableB[Business_Date])
    )

    then for the measure : 

    UniqueDateCount = DISTINCTCOUNT(UNION(SELECTCOLUMNS(TableA, "Date", TableA[Opening_Date]), SELECTCOLUMNS(TableB, "Date", TableB[Business_Date])))