The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |