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.
Hi I am using a measure to show % the problem if there is no data in the future it is showing blank is there any chance can we show it as -100% like that
Solved! Go to Solution.
Try this
GBP % =
VAR CurrentYearASP = [sum GBP]
VAR PreviousYearASP =
CALCULATE ( [sum GBP], DATEADD ( 'Date table'[Date], -1, YEAR ) )
VAR _result =
DIVIDE ( CurrentYearASP - PreviousYearASP, PreviousYearASP )
RETURN
IF ( ISBLANK ( _result ), -1, _result )
Try this
GBP % =
VAR CurrentYearASP = [sum GBP]
VAR PreviousYearASP =
CALCULATE ( [sum GBP], DATEADD ( 'Date table'[Date], -1, YEAR ) )
VAR _result =
DIVIDE ( CurrentYearASP - PreviousYearASP, PreviousYearASP )
RETURN
IF ( ISBLANK ( _result ), -1, _result )
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |