Forum Discussion

Geberle's avatar
Geberle
New Member
8 years ago

Auto refresh for DAX tables

I have created a date table with a DAX expression similar to the following:

 

Kalender =
--
-- Start der Konfiguration

VAR StartJahr = 2008 -- Hier startet der Kalender
VAR EndeJahr = 2025 -- Hier endet der Kalender
VAR KalenderPrefix = ""

--- Ende der Konfiguration
--

VAR KalenderErsterTag =
    DATE ( StartJahr; 1; 1 )
VAR KalenderLetzerTag =
    DATE ( EndeJahr; 12; 31 )

VAR KalenderRoh =
    CALENDAR ( KalenderErsterTag; KalenderLetzerTag )

VAR KalenderBasis =
    GENERATE (
        KalenderRoh;
        VAR KalDatum = [Date]
        VAR KalJahr =
            YEAR ( [Date] )
        RETURN
            ROW (
                "Kalender JahrZahl"; KalJahr;
                "Kalender Jahr"; KalenderPrefix & KalJahr
            
            )
    )
RETURN
    SELECTCOLUMNS (
        KalenderBasis;
        "Datum"; [Date];
        "JahrZahl"; [Kalender JahrZahl];
        "Jahr"; [Kalender Jahr]
    )

The code works fine. But when I save the model as a PowerBI-Template (.pbit) and I try to reuse it in a new model, the will not generate automatically. Even if I safe the file as a .pbix file and reopen it. I allways have to manually refresh the table.

 

Is there a setting I can check?

 

Thanks for helping,

Georg.