Forum Discussion
Anonymous_001
3 years agoFrequent Visitor
CALENDAR FUNCTION
hi Team, Can measures be entered a input into the Calendar Function? e.g. Calendar(<measure1>, <measure2>) Thanks
parry2k
Super User
3 years agoAnonymous_001 not sure what I'm missing here, can you share the pbix file using one drive/google drive, remove sensitive information before sharing
- Anonymous_0013 years agoFrequent Visitor
Unfortunately, I'm unable to share file due to work IT restrictions.
Basically, there is one table with data extracted on different dates. I've called this the source column (Text Data type because the values are alpha numeric)
Below is the formula to calculate the 2 measures in the table which returns the old and recent date based on the user selection of source column slicerMAJOR = VAR SelectedSource1 = SELECTEDVALUE('TableA'[Source])VAR FilteredTable1 = FILTER('TableA', 'TableA'[Source] = SelectedSource1)VAR LatestDate = MAXX(FilteredTable1, 'TableA'[Calendar Week])RETURNLatestDateMINOR =VAR SelectedSource = SELECTEDVALUE('TableA'[Source])VAR FilteredTable = FILTER('TableA', 'TableA'[Source] = SelectedSource)VAR OldestDate = MINX(FilteredTable, 'TableA'[Calendar Week])RETURNOldestDate
[Calendar Week] is Date Data Type with format dd/mm/yyTesting MINOR on Card Visual returns 21/08/23. Measure has format dd/mm/yyTesting MAJOR on Card Visual returns 22/07/24. Measure has format dd/mm/yyI'm trying to create Calendar table using MINOR and MAJOR as the 2 date inputs. The formula doesnt give any errors but returns a blank table. - Anonymous_0013 years agoFrequent Visitor
parry2k @Any further suggestions?