Forum Discussion
Quickly DAX measure fix - Filter
- 6 years ago
hej pawelj795
W pliku ktory wyslales nie bylo tego obiektu wiec musiale go wylachys z formuly.
Zalaczylem plik z formua.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Chyba nie do końca dobrze wytłumaczyłem wszystko.
Chodzi o to, żeby do wiekowania, wybór indeksów był na podstawie trans type 0 i 9. -> czyli w _tbl filtr musi pozostać.
Natomiast do wyliczenia wartości wybranych indeksów były brane wszystkie transakcje (bez filtra na trans type). -> jak wyłączyć filtr na trans type w Treatas?
Hej pawelj795
Spobuj, tego
M =
VAR __tbl =
FILTER(
GROUPBY(
CALCULATETABLE(
WH_Invent_Trans,
KEEPFILTERS( WH_Invent_Trans[TransType] IN { 0, 9 } ),
KEEPFILTERS( WH_Invent_Trans[QTY] <> BLANK() ),
ALLEXCEPT( WH_Invent_Trans, WH_Invent_Trans[ItemID] )
),
WH_Invent_Trans[ItemID],
"@maxDate", MAXX( CURRENTGROUP(), WH_Invent_Trans[DatePhysical] )
),
VAR __days = DATEDIFF( [@maxDate], TODAY() -1, DAY )
RETURN __days > 0 && __days <= 276 --changed as 15 was out of range
)
RETURN
CALCULATE(
SUM( WH_Invent_Trans[Inventory Value EUR] ),
TREATAS(
SUMMARIZE( __tbl, WH_Invent_Trans[ItemID] ), WH_Invent_Trans[ItemID]
)
--DATESYTD(DimDates[Date]);
)
Mariusz
If this post helps, then please consider Accepting it as the solution.
- pawelj7956 years ago
Post Prodigy
Mariusz
Dostaje błąd: "The end of the input was reached"
Dlaczego YTD wylaczyles z formuly?- Mariusz6 years ago
Community Champion
hej pawelj795
W pliku ktory wyslales nie bylo tego obiektu wiec musiale go wylachys z formuly.
Zalaczylem plik z formua.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.- pawelj7956 years ago
Post Prodigy
Dokładnie o to mi chodziło 😉
Bardzo ci dziękuje za pomoc i wesołych świąt !