Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Comparaison between slicer date and data date with measure

Hello ,    I own set of data with 6 columns like this under power bi :     With measure and a slicer I want show in a table or matrix severals columns. The slicer must be built with the "d...
  • v-xuding-msft's avatar
    v-xuding-msft
    6 years ago

    Hi Anonymous ,

    I create a sample that you can reference.

    Date Min = 
    var mi = MIN('Date'[Date])
    return
    SWITCH(TRUE(),MAX('Table'[date start])>mi,-1,MAX('Table'[date start])=mi,0,MAX('Table'[date start])<mi,1)
    
    Date Max = 
    var ma = MAX('Date'[Date])
    return
    SWITCH(TRUE(),MAX('Table'[date finish])>ma,-1,MAX('Table'[date finish])=ma,0,MAX('Table'[date finish])<ma,1)

    Case 1Case 2

    Best Regards,

    Xue Ding

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.