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.
I have my measure Revenue YearToDate as
CALCULATE( [Revenue] , DATESYTD('Date'[Date],"31/05" ))
I want to make sure that whenever I have 0, I display blank and never 0...
How can I change it to display 'blank' and not 0?
(I know I can put it in a variable and create an IF, but not sure if that's an optimal solution....)
@Anonymous
If you want to make the formula as fast as possible (use only the Storage Engine), then there's a trick:
[YTD] =
var ytd =
CALCULATE(
[Revenue],
DATESYTD('Date'[Date], "31/05")
)
var result =
// this is the trick that makes sure
// only the storage engine is used
DIVIDE( ytd, ytd ) * ytd
return
result
@Anonymous , Try like
Measure =
var _1 _1 = CALCULATE( [Revenue] , DATESYTD('Date'[Date],"31/05" ))
return
if(_1=0, blank(), _1)
Blank means it will not display unless you show item with no data
User | Count |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
13 | |
10 | |
7 |