Hello,
i have the following datamodel:
Top level: Kunde (Customer)
2nd level Projekt (project) with lookup column called "Kunde"
3d level Case (case) with lookup column called "Projekt"
4th level Kosten (costs) with lookup "Case" This table has an additional looukp directly to Kunde calles externalAccounting
I want to display all costs of a selected customer.
It works fine with:
With(
{
_ProjectPerKunde: Filter(
Projekts,
Kunde.Kunde = filter_Kunde.Selected.Kunde
).Projekt
},
With(
{
_CasePerProjekt: Filter(
Cases,
Projekt.Projekt in _ProjectPerKunde
).Case
},
Filter(
Kosten,
Case.Case in _CasePerProjekt
)
)
)

In the next step i want to be able to only select a specific projekt of this customer
With(
{
_ProjectPerKunde: Filter(
Projekts,
Kunde.Kunde = filter_Kunde.Selected.Kunde And Projektnummer=filter_Projekt.Selected.Projektnummer
).Projekt
},
With(
{
_CasePerProjekt: Filter(
Cases,
(Projekt.Projekt in _ProjectPerKunde)
).Case
},
Filter(
Kosten,
Case.Case in _CasePerProjekt
)
)
)

Now it shows me all costs.
I do not understand how i can get more records if i make the filter more restrictive
Any help is welcome, this drives me mad.
This is an easy problem and i can not see what i do wrong