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.
That works, thanks 😉
Now, I want to develop this measure.
Groups =
VAR ItemID = SELECTEDVALUE(WH_Invent_Trans[ItemID])
VAR DateDifference =
DATEDIFF(
MAXX(
FILTER(WH_Invent_Trans;
WH_Invent_Trans[ItemID]=ItemID
&& WH_Invent_Trans[TransType] IN {0;9}
&& WH_Invent_Trans[QTY] <> BLANK()
);
WH_Invent_Trans[Date Physical]);
TODAY()-1;
DAY)
RETURN
CALCULATE(
SUM(
WH_Invent_Trans[Inventory Value EUR]);
DATESYTD(DimDates[Date]);
DateDifference > 0 && DateDifference<= 15)
But it doesn't work.
It shows:
the true/false expression does not specify a column. Each true/false expressions used as table filter expression must refer to exactly one column
Hi pawelj795
You can not use variable or && as a CALCULATE filter argument.
Can you create a small data sample and explain the result? seeing data and expected result always helps.
Mariusz
If this post helps, then please consider Accepting it as the solution.
- pawelj7956 years ago
Post Prodigy
Mariusz
I must combine results from first measure you fixed as filter to my YTD calculation.
In meantime, I prepare some sample data.
Do you mind write in Polish?
It would be much easier to explain 😉- pawelj7956 years ago
Post Prodigy
- pawelj7956 years ago
Post Prodigy
Mariusz
Tłumacząc najprościej, chciałbym policzyć wiekowanie stanów magazynowych na wczoraj dla każdego przedmiotu (itemu) na podstawie daty przyjęcia.
Bardzo ważną kwestią jest to, że dla każdego przedziału wiekowania musi być oddzielna miara z przedziałem, tzn:
1. Miara (0,15 dni2. Miara (16,30 dni itd ...
Z tym, że do policzonego stanu magazynowego musi być brany wyłącznie określony typ transakcji (transtype 0,9).
Kolejny warunek to taki, że nie mogą być brane transakcje, których ilośc jest pusta (QTY<>blank).