Forum Discussion
Variable Measures?
I feel you are working way too hard on this :)
Your MonthSelect table already has a MonthNumber and MonthDate (start of month).
MonthNumSelect could be just MIN(MonthSelect[MonthNumber]) ... no?
I would add EndOfMonth and NetworkDays as calculated columns on your MonthSelect table, and write really simple measures based on that...
MIN(MonthSelect[MonthNumber]) is pretty much functionally identical to the one I have ... as when the filter is on it will display only the month filtered.
However still causes the same problem in my 'WFP YTD ration" being off (except the new number is slightly different as it reflects januarys network days)
I made the calculated columns but cannot put them into the measure as it doesnt refer to a min max etc
- Anonymous9 years agoNot applicable
Can you add a screen shot of your model relationships?
Not sure how DimDate/MonthSelect and your fact table relate.
- chrismiller9 years agoHelper I
sure no problem, hope this helps.
- Dog9 years agoResponsive Resident
Hi,
hopefully I'm not confusing the issue further but as you are referring to and passing the dates for selected month do you need the relationship between selectedmonth and dimdate.
if its used for other purposes would it work by passing the ALL('DimDate') into the filter of your measure to avoid the filtering when selected.
NETWORK DAYS 2017_variable = CALCULATE(COUNTROWS('DimDate'),ALL('DimDate'), FILTER('DimDate', 'DimDate'[Day of Week Number] < 6),DATESBETWEEN(DimDate[Date],DATE(2017,[MonthNumSelect],1), DATE(2017,[MonthNumSelect],[EndofMonthday])))