The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone
I am fairly new to Power BI and DAX in particular is still causing me a lot of problems.
I want to create a KPI tile with a time series (last 12 months) and the current/last value in the header. I use a line chart for this.
If I display the value directly in the line chart, everything is fine. But in the header the same logic it is not working.
In a table, however, the correct value is displayed in the time series, but the unfiltered total is still calculated under "Total". This somehow seems to be the cause, but I am totally lost solving the problem:
GTK per Monat Σ Gesamt Ende Label =
VAR MaxDate =
CALCULATE ( MAX ( '02 Kalender'[Datum] ), ALLSELECTED () )
RETURN
IF ( MAX ( '02 Kalender'[Datum] ) = MaxDate, [GTK per Monat Σ Gesamt] )
KPI HR GTK Header =
VAR MaxDate =
CALCULATE ( MAX ( '02 Kalender'[Datum] ), ALLSELECTED () )
RETURN
//CONVERT(MaxDate, STRING)
CONVERT(IF ( MAX ( '02 Kalender'[Datum] ) = MaxDate, [GTK per Monat Σ Gesamt] ), STRING)
I would be infinitely grateful if anyone has any advice.
Best regards
Jennifer
Solved! Go to Solution.
Hi @talespin ,
thank you for your reply. I didn't work out for my use case... I don't get it...
Nevertheless, I found a workaround - at least for my specific use case:
KPI HR GTK Header =
CONVERT(LASTNONBLANKVALUE('02 Kalender (Betrachtungszeitraum)'[Datum], [GTK per Monat Σ Gesamt]), STRING)
Kind regards!
hi @jmuth
I used a Calendar table and TestTable with one to many relationship.
Hi @talespin ,
thank you for your reply. I didn't work out for my use case... I don't get it...
Nevertheless, I found a workaround - at least for my specific use case:
KPI HR GTK Header =
CONVERT(LASTNONBLANKVALUE('02 Kalender (Betrachtungszeitraum)'[Datum], [GTK per Monat Σ Gesamt]), STRING)
Kind regards!
User | Count |
---|---|
12 | |
8 | |
7 | |
6 | |
5 |
User | Count |
---|---|
21 | |
15 | |
15 | |
10 | |
7 |