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.
I have the following measure that calculates % change
As mentioned works fine other than this, and even works fine for if both values are 0, as expected 0% change is shown:
It also works fine if the current year value is 0 and previous year is greater than 0.
Any help appreciated.
@Anonymous , Try like
measure =
_Num = CALCULATE ( (DISTINCTCOUNT('Table'[ID])),
FILTER(ALL('Date'[FY]),
'Date'[FY] = MAX('Date'[FY])))
VAR _Den =
CALCULATE (
DISTINCTCOUNT('Table'[ID]),
FILTER(ALL('Date'[FY]),
'Date'[FY] = MAX('Date'[FY])-1))
VAR _PercentChange = divide(_Num-_Den),_Den ,0)
RETURN
_PercentChange
Hi @amitchandak , this measure just returns a blank % change. (I had to add another open bracket after the divide fucntion to get the measure to work, but yes still returns blank value)