Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I'm looking for some help regarding forcing zero's.
Measure below is working correcty, but I would like to show zero's instead of blanks in the following scenario's:
- Customer has [Sales] withing scope period
- Only show zero's within the scope period.
Cannot use calculated columns / PowerQuery.
Test =
VAR _start = DATE(2021,9,1)
VAR _scope = DATESBETWEEN('Calendar'[Date], _start, TODAY())
RETURN
CALCULATE([Sales], _scope)
Current result:
Year 2021 | ||||
Customer/Sales | August | September | Oktober | Totals |
A | BLANK | BLANK | 10 | 10 |
B | BLANK | BLANK | BLANK | BLANK |
C | BLANK | 30 | BLANK | 30 |
D | BLANK | 10 | 20 | 30 |
E | BLANK | BLANK | BLANK | BLANK |
Totals | BLANK | 40 | 30 | 70 |
Desired result:
Year 2021 | ||||
Customer/Sales | August | September | Oktober | Totals |
A | BLANK | 0 | 10 | 10 |
B | BLANK | BLANK | BLANK | BLANK |
C | BLANK | 30 | 0 | 30 |
D | BLANK | 10 | 20 | 30 |
E | BLANK | BLANK | BLANK | BLANK |
Totals | BLANK | 40 | 30 | 70 |
Hope anyone is able to help me. Already tried a lot of ALL, REMOVEFILTERS, FILTER, ALLEXEPT, etc.
Thanks for your reply. Unfortunatly your suggestion only takes the 'Calender' into consideration, not the 'Customer'.
So I need a double range solution which takes DATESBETWEEN into consideration.
So, if the customer has any value in the given period, all dates in given period should get 0 instead of blank.
@PVO2 , Please find example measure for +0 for a selected range
0 between range
Measure = var _1= SUM(Opportunity[Opportunity count]) +0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))
User | Count |
---|---|
102 | |
90 | |
80 | |
71 | |
69 |
User | Count |
---|---|
113 | |
99 | |
97 | |
72 | |
68 |