Forum Discussion

MartinHatch's avatar
MartinHatch
New Member
7 years ago
Solved

How can I show a matrix by day/month, when source date values are in From > To structure

So I have some source data which documents "Staff Travel"    The format is fairly basic (this has been simplified for the purposes of this post):   Name Date From Date To And they want to be...
  • v-chuncz-msft's avatar
    7 years ago

    MartinHatch,

     

    Try to drag [Date] from a calendar table to Columns, measure below to Values and apply Conditional formatting.

     

    Measure =
    VAR d =
        SELECTEDVALUE ( 'Calendar'[Date] )
    RETURN
        IF (
            d >= SELECTEDVALUE ( Table1[From] )
                && d <= SELECTEDVALUE ( Table1[To] ),
            "IN",
            "OUT"
        )