Forum Discussion
Visualization for a period
- Anonymous9 years ago
Hi jamalq123,
It seems like you have misunderstood for my formula. Actually, you need to select two date on slicer as the source of measure.
For my formula, it support to choose multiple value and get the dynamic range based on slicer.
According to your description, it sounds like you need to get the static range(6 month), right?
If this is a case, you can try to use below formula:Salestrens 2 = var selectDate=IF(HASONEVALUE(dDate1[EoMonth]),VALUES(dDate1[EoMonth]),LASTDATE(ALLSELECTED(dDate1[EoMonth])))//get the max date form slicer if you select mutiple value return CALCULATE([Total Sales],DATESBETWEEN(dDate1[EoMonth],DATE(YEAR(selectDate),MONTH(selectDate)-6,DAY(selectDate)),selectDate))
Regards,
Xiaoxin Sheng
Hi jamalq123,
It seems like you have misunderstood for my formula. Actually, you need to select two date on slicer as the source of measure.
For my formula, it support to choose multiple value and get the dynamic range based on slicer.
According to your description, it sounds like you need to get the static range(6 month), right?
If this is a case, you can try to use below formula:
Salestrens 2 = var selectDate=IF(HASONEVALUE(dDate1[EoMonth]),VALUES(dDate1[EoMonth]),LASTDATE(ALLSELECTED(dDate1[EoMonth])))//get the max date form slicer if you select mutiple value return CALCULATE([Total Sales],DATESBETWEEN(dDate1[EoMonth],DATE(YEAR(selectDate),MONTH(selectDate)-6,DAY(selectDate)),selectDate))
Regards,
Xiaoxin Sheng
Excellent, It is working well.
Thanks a lot