Forum Discussion
Comparaison between slicer date and data date with measure
- 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.
Hello Anonymous ,
The time intelligence features in power bi provide slicers with so much capabilities that I think you won't need a measure. I am not clear on all the columns you described. Could you provide a sample result of what you would like the table to contain, please?
Best regards,
Hello,
4 cases to illustrate the wanted result :
- v-xuding-msft6 years ago
Community Support
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.
- Anonymous6 years agoNot applicable
Hello ,
Thanks for this solution , I write the formulas on my calculation .