Forum Discussion
Datum und if
Hallo zusammen, ich habe folgende Aufgabenstellung:
Es sollen zwei Datums-Angaben verglichen werden und dann Punkte vergeben werden.
Aktuell ist folgende Formel eingegeben:
- Anonymous2 years ago
Hi Lena_2024
Thanks for the reply from bhanu_gautam .
I think there is nothing wrong with the formula you are using. I am guessing that you are using a calculated column instead of a measure. Here is how I put your formula into a measure.
Punkte Inbetriebnahme = if(max('Referenzliste NAV'[Inbetriebnahme]) > CALCULATE(max(Kriterien[Bewertung]), Kriterien[Kriterium] = "Termine:Inbetriebnahme"), calculate(sum( Kriterien[Punkte]) *1, Kriterien[Kriterium] = "Termine:Inbetriebnahme"), 0)Output:
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- bhanu_gautamSuper User
Lena_2024 , Try using below mentioned DAX
DAX
Commissioning points =
IF (
MAX ( 'Reference list NAV'[Commissioning] ) >
CALCULATE (
MAX ( Criteria[Date] ),
Criteria[Criterion] = "Dates: Commissioning",
Criteria[Project] = EARLIER('Reference list NAV'[Project])
),
CALCULATE (
SUM ( Criteria[Points] ) * 1,
Criteria[Criterion] = "Dates: Commissioning",
Criteria[Project] = EARLIER('Reference list NAV'[Project])
),
0
) - Lena_2024New Member
Hi Bhanu,
thanks for your message. It does't work, sorry.
Ich versuche ergänzende Informationen zu geben.Das ist die Tabelle mit den Projekten und den Terminen:
Und das ist eine Tabelle mit Punkten:
Wenn das Datum in der zweiten Tabelle Spalte "Bewertung" größer ist als das Datum in der ersten Tabelle Spalte "Inbetriebnahme" ist, dann sollen alle Projekte, für die das gültig ist, 5 Punkte bekommen.
viele Grüße
Lena
- AnonymousNot applicable
Hi Lena_2024
Thanks for the reply from bhanu_gautam .
I think there is nothing wrong with the formula you are using. I am guessing that you are using a calculated column instead of a measure. Here is how I put your formula into a measure.
Punkte Inbetriebnahme = if(max('Referenzliste NAV'[Inbetriebnahme]) > CALCULATE(max(Kriterien[Bewertung]), Kriterien[Kriterium] = "Termine:Inbetriebnahme"), calculate(sum( Kriterien[Punkte]) *1, Kriterien[Kriterium] = "Termine:Inbetriebnahme"), 0)Output:
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Lena_2024New Member
Thank you so much, bhanu and Yulia, for your help. 🙂
I found a mistake in the Data Model which was the problem. Unfortunately I didn't see that before.