Forum Discussion
How to create a measure based on slicer selection
- 3 years ago
Hi Pallavi_m ,
If you create a relationship between your Period and Fact tables, the measure will naturally show blank if the month selected in period doesn't exist yet in your fact table. You can create a Month Year calculated colum in Fact, say
Month Year = FORMAT ( Fact[Date], "MMM YYYY" ) and then create relationship between this column and monthyear in Period.
- Anonymous3 years ago
Hi Pallavi_m ,
Create a measure like below and add it to visual filter set value = 1.
Measure = IF(SELECTEDVALUE('Table'[monthyear]) in VALUES('calendar'[monthyear])&&DATEVALUE(SELECTEDVALUE('Table'[monthyear]))<=EOMONTH(TODAY(),0),1,0)
Hi Pallavi_m ,
If you create a relationship between your Period and Fact tables, the measure will naturally show blank if the month selected in period doesn't exist yet in your fact table. You can create a Month Year calculated colum in Fact, say
Month Year = FORMAT ( Fact[Date], "MMM YYYY" ) and then create relationship between this column and monthyear in Period.