Reputation: 5174
I'm trying to get a simple chart with columns for one value and a line for another value.
My problem is that the DAX measure is forcing all the weeks to show in the chart, even the ones without data (because they will get the acumulate from the ones before).
This is the measure:
P-Soll(sum) = CALCULATE(
SUM(TEVON_parts_current_K[P-Soll]),
ALLSELECTED(TEVON_parts_current_K),
'Orden Semanas_Soll'[Index]<=MAX('Orden Semanas_Soll'[Index])
)
This is how it shows:
And these are the weeks with data:
There are more, but you can get the idea. Is there any way to show only the weeks with real data?
Upvotes: 1
Views: 257
Reputation: 2103
try If like
P-Soll(sum) =
VAR CurrentWeekValue = ...
VAR Cumulative=
CALCULATE(
SUM(TEVON_parts_current_K[P-Soll])
,ALLSELECTED(TEVON_parts_current_K)
,'Orden Semanas_Soll'[Index]<=MAX('Orden Semanas_Soll'[Index])
)
RETURN
IF(CurrentWeekValue = 0,BLANK(),Cumulative)
Upvotes: 2