Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Calculate First Date of goods Sold

Hello everybody, 

i have a broblem building a measure, that sums up dynmically sales before a certain point of time for different sales location.

So the Basic situation is this: 

 

-Dimension Table Studios (Sales Location)

-Dimension Table Vertragsmodelle (Information regarding rates)

-Fact Table Zugägne/Abgänge( Amount of Sales per Day)

 

What I want : 

 

- For some Sales location, we offered a special contract with lower rates at a certain point. 

- This special contract was offered at different points in time for our Sales location 

- I want to calculate sales before that point in time and compare it with sales after that point in time per Sales location to analyze, wheter this cheaper rates ha a postive business impact.

 

What i did so far: 

-  I calculated the following measure that workes fine and gives me the specific point in time where sales for that special contract started. 

 

Basic Indikator = CALCULATE(
min('Datum Täglich'[Datum_Tag]);
Filter('Zugänge/Abgänge';[Zugänge]>0);
Filter('Zugänge/Abgänge';Related(Vertragsmodelle[SV_Preis_Nach_MLZ])<15)
)
- What i attempted to  do now ist to calculates Sales amount after and before that Date. 
 
Zugang nach Preisumstellung =
CALCULATE (
    SUM ( 'Zugänge/Abgänge'[Zugaenge] );
    FILTER (
        'Datum Täglich';
        'Datum Täglich'[Datum_Tag].[Date]
            >= DATE ( YEAR ( [Basic Indikator] ); MONTH ( [Basic Indikator] ); DAY ( [Basic Indikator] ) )
    )
)
This measure however gives me the same result as a simple:  
Zugänge = CALCULATE(Sum('Zugänge/Abgänge'[Zugaenge]))

So Apparently, the Filter arguments are somehow ignored in the calculation. 

I read about problems with calculate formula regarding measures as a dynamic filter, so instead of using the measure as a plain filter, i had to use Filter[measure]

I also tried to make the mesaure [Basic Indikaor] a calculated column. This however did not provide me with a correct result. 

 

Can you please help me with that Problem ? 

 

Kind regards 

1 REPLY 1
dax
Community Support
Community Support

Hi ogruss,

If possible, could you please inform me more detailed information (such as your simple sample and your expected output)? Then I will help you more correctly.

Please do mask sensitive data before uploading.

Thanks for your understanding and support.
Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.