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

Cumulative TOTALTYD measure adds wrong information

Hello Power BI community,

 

For this problem i need your help. In the matrix below i am trying to calculate the returns of investments. At firts i made a measure that calculates the returns called 'rendement'. But now the returns is empty on week 52 and because of that the cumulative goes from 683944 to 3131372 when it should stay the same, because the measure of the returns is 0. Can someone explain why this is happening?

Cumulative wrong information.PNGKnipsel.PNG

2 REPLIES 2
TomMartens
Super User
Super User

Hey,

 

please post the DAX behind the measures for [Rendement] and [**bleep**. Total Rendement], I assume both are measure and not calculated columns.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Hi @TomMartens,

 

Sorry for the late reply.

Below I will first give you the measure of Rendement and after that the cumulative rendement. the measure rendement exists of 4 elements: turnover minus cost of labor minus cost of usage of gas minus the rent.

 

Rendement = [Omzet]-[Totaal arbeid]-[Totale gaskosten]-sum('Kosten huur-gas-arbeid'[Huur per week])

 

Omzet =
([Middenprijs komkommers]*CALCULATE(SUM(Productiegegevens[Productie teelt]);
    FILTER(Productiegegevens;Productiegegevens[Soort teelt]="Komkommer"))+
(SUM('Prijs gegevens'[€/kg l'amuse])*CALCULATE(SUM(Productiegegevens[Productie teelt]);
    FILTER(Productiegegevens;Productiegegevens[Soort teelt]="Tomaat");
    FILTER(Productiegegevens;Productiegegevens[Soort teelt]="l'amuse"))))+
(SUM('Prijs gegevens'[€/kg TastyTom])*CALCULATE(SUM(Productiegegevens[Productie teelt]);
    FILTER(Productiegegevens;Productiegegevens[Soort teelt]="Tomaat");
    FILTER(Productiegegevens;Productiegegevens[Soort teelt]="tastytom")))

Totaal arbeid =
((CALCULATE(SUM('Kosten huur-gas-arbeid'[Arbeid/Uur]);FILTER('Kosten huur-gas-arbeid';'Kosten huur-gas-arbeid'[Afdeling]="1-3")))*SUM(Arbeid[Werkelijke uren Bovenstehuis 1-3]))
+
((CALCULATE(SUM('Kosten huur-gas-arbeid'[Arbeid/Uur]);FILTER('Kosten huur-gas-arbeid';'Kosten huur-gas-arbeid'[Afdeling]="4-6")))*SUM(Arbeid[Werkelijke uren Bovenstehuis 4-6]))
+
((CALCULATE(SUM('Kosten huur-gas-arbeid'[Arbeid/Uur]);FILTER('Kosten huur-gas-arbeid';'Kosten huur-gas-arbeid'[Afdeling]="1-6")))*SUM(Arbeid[Werkelijke uren Neerbroek 1-6]))
+
((CALCULATE(SUM('Kosten huur-gas-arbeid'[Arbeid/Uur]);FILTER('Kosten huur-gas-arbeid';'Kosten huur-gas-arbeid'[Afdeling]="7-8")))*SUM(Arbeid[Werkelijke uren Neerbroek 7-8]))
 
Totale gaskosten = '3 Gasverbruik measures'[Kosten gasverbruik 1-3]+'3 Gasverbruik measures'[Kosten gasverbruik 1-6]+'3 Gasverbruik measures'[Kosten gasverbruik 4-6]+'3 Gasverbruik measures'[Kosten gasverbruik 7-8]

 

-------------------------------------------------------------------------------------------------------------------------

Cumulative Totaal rendement =
CALCULATE(
    '4 Omzet measures'[Omzet];
    FILTER(
        ALL(Kalender[ISO Week]);
        (Kalender[ISO Week] <= MAX(Kalender[ISO Week]))))

-

(TOTALYTD(SUM(Arbeid[Werkelijke uren Bovenstehuis 1-3]);Kalender[Datum])*CALCULATE(SUM('Kosten huur-gas-arbeid'[Arbeid/Uur 1-3]))+
TOTALYTD(SUM(Arbeid[Werkelijke uren Bovenstehuis 4-6]);Kalender[Datum])*CALCULATE(SUM('Kosten huur-gas-arbeid'[Arbeid/Uur 4-6]))+
TOTALYTD(SUM(Arbeid[Werkelijke uren Neerbroek 1-6]);Kalender[Datum])*CALCULATE(SUM('Kosten huur-gas-arbeid'[Arbeid/Uur 1-6]))+
TOTALYTD(SUM(Arbeid[Werkelijke uren Neerbroek 7-8]);Kalender[Datum])*CALCULATE(SUM('Kosten huur-gas-arbeid'[Arbeid/Uur 7-8])))

-

((TOTALYTD(SUM('Kosten huur-gas-arbeid'[Huur 1-3]);Kalender[Datum]))+
(TOTALYTD(SUM('Kosten huur-gas-arbeid'[Huur 4-6]);Kalender[Datum]))+
(TOTALYTD(SUM('Kosten huur-gas-arbeid'[Huur 1-6]);Kalender[Datum]))+
(TOTALYTD(SUM('Kosten huur-gas-arbeid'[Huur 7-8]);Kalender[Datum])))

-

(TOTALYTD('3 Gasverbruik measures'[Gasverbruik 1-3 m3 Bovenstehuis];Kalender[Datum])*CALCULATE(SUM('Kosten huur-gas-arbeid'[Gas/M3 1-3]))+
TOTALYTD('3 Gasverbruik measures'[Gasverbruik 4-6 m3 Bovenstehuis];Kalender[Datum])*CALCULATE(SUM('Kosten huur-gas-arbeid'[Gas/M3 4-6]))+
TOTALYTD('3 Gasverbruik measures'[Gasverbruik 1-6 m3 Neerbroek];Kalender[Datum])*CALCULATE(SUM('Kosten huur-gas-arbeid'[Gas/M3 1-6]))+
TOTALYTD('3 Gasverbruik measures'[Gasverbruik 7-8 m3 Neerbroek];Kalender[Datum])*CALCULATE(SUM('Kosten huur-gas-arbeid'[Gas/M3 7-8])))


Thanks in advance,
 
Sven

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.