The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
l am trying to use below VAR value in the Calculate function but not working
LY YTD Sales =
VAR MM=month(Max(SalesDataDates)) -- store max date from sales data table
VAR YY=Year(Max(SalesDataDates)) -- store max Year No from sales data table
Return
Calculate(CY YTD Sales, dateTable[MonthNo]<=MM&&dateTable[YearNo]<=YY)
Somebody please help
hi @Anonymous
It depends on the filter context but you may try
VAR YY=YEAR ( MAXX ( ALL ( SalesData ), SalesData[Dates] ) )
User | Count |
---|---|
11 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
14 | |
14 | |
9 | |
7 |